forked from mpusz/mp-units
refactor: quantity cration helpers are not opt-out rather than opt-in
Resolves #277
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user