refactor: quantity cration helpers are not opt-out rather than opt-in

Resolves #277
This commit is contained in:
Mateusz Pusz
2021-05-09 15:52:20 +02:00
parent c1cf800bd1
commit 2c8c6c2e98
99 changed files with 500 additions and 517 deletions
+8 -2
View File
@@ -28,7 +28,10 @@ cmake_minimum_required(VERSION 3.2)
function(add_example target)
add_executable(${target}-references ${target}.cpp)
target_link_libraries(${target}-references PRIVATE ${ARGN})
target_compile_definitions(${target}-references PRIVATE UNITS_REFERENCES)
target_compile_definitions(${target}-references PRIVATE
UNITS_NO_LITERALS
UNITS_NO_ALIASES
)
endfunction()
add_example(avg_speed mp-units::core-io mp-units::si mp-units::si-cgs mp-units::si-international)
@@ -42,7 +45,10 @@ add_example(unknown_dimension mp-units::core-io mp-units::si)
if(NOT UNITS_LIBCXX)
add_example(glide_computer_example mp-units::core-fmt mp-units::si-international glide_computer)
target_compile_definitions(glide_computer_example-references PRIVATE UNITS_REFERENCES)
target_compile_definitions(glide_computer_example-references PRIVATE
UNITS_NO_LITERALS
UNITS_NO_ALIASES
)
find_package(linear_algebra CONFIG REQUIRED)
add_example(linear_algebra mp-units::core-fmt mp-units::core-io mp-units::si)