mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 12:24:26 +02:00
feat: add module mp_units
This commit is contained in:
committed by
Mateusz Pusz
parent
f3ad392123
commit
7cb2099af5
@@ -23,5 +23,10 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
add_library(glide_computer_lib STATIC glide_computer_lib.cpp include/glide_computer_lib.h)
|
||||
target_link_libraries(glide_computer_lib PRIVATE mp-units::core-fmt PUBLIC mp-units::si mp-units::utility example_utils)
|
||||
if(TARGET mp-units::modules)
|
||||
target_link_libraries(glide_computer_lib PUBLIC gsl::gsl-lite mp-units::modules)
|
||||
else()
|
||||
target_link_libraries(glide_computer_lib PRIVATE mp-units::core-fmt PUBLIC mp-units::si mp-units::utility)
|
||||
endif()
|
||||
target_link_libraries(glide_computer_lib PUBLIC example_utils)
|
||||
target_include_directories(glide_computer_lib PUBLIC include)
|
||||
|
@@ -21,10 +21,14 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "glide_computer_lib.h"
|
||||
#include <mp-units/format.h>
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
#include <string_view>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units.core_fmt;
|
||||
#else
|
||||
#include <mp-units/format.h>
|
||||
#endif
|
||||
|
||||
namespace glide_computer {
|
||||
|
||||
|
@@ -22,11 +22,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <mp-units/quantity_spec_macro.h>
|
||||
//
|
||||
#include "geographic.h"
|
||||
#include <mp-units/chrono.h>
|
||||
#include <mp-units/math.h> // IWYU pragma: keep
|
||||
#include <mp-units/quantity_point.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <initializer_list>
|
||||
@@ -35,6 +33,14 @@
|
||||
#include <ranges>
|
||||
#include <string> // IWYU pragma: keep
|
||||
#include <vector>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/chrono.h>
|
||||
#include <mp-units/math.h> // IWYU pragma: keep
|
||||
#include <mp-units/quantity_point.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#endif
|
||||
|
||||
// An example of a really simplified tactical glide computer
|
||||
// Simplifications:
|
||||
|
Reference in New Issue
Block a user