build: projectPrefix usage added

This commit is contained in:
Mateusz Pusz committed 2021-11-05 23:35:30 +01:00
1 parent bc7849beb1
commit f9fb6cc8b3
13 files changed
+52 -47

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ add_example(custom_systems mp-units::core-io mp-units::si)
add_example(hello_units mp-units::core-fmt mp-units::core-io mp-units::si mp-units::si-international)
add_example(measurement mp-units::core-io mp-units::si)
if(NOT UNITS_LIBCXX)
if(NOT ${projectPrefix}LIBCXX)
add_subdirectory(glide_computer)
endif()
+5 -5
View File
@@ -29,8 +29,8 @@ function(add_example target)
add_executable(${target}-aliases ${target}.cpp)
target_link_libraries(${target}-aliases PRIVATE ${ARGN})
target_compile_definitions(${target}-aliases PRIVATE
UNITS_NO_LITERALS
UNITS_NO_REFERENCES
${projectPrefix}NO_LITERALS
${projectPrefix}NO_REFERENCES
)
endfunction()
@@ -44,11 +44,11 @@ add_example(measurement mp-units::core-io mp-units::si)
add_example(total_energy mp-units::core-io mp-units::si mp-units::isq-natural)
add_example(unknown_dimension mp-units::core-io mp-units::si)
if(NOT UNITS_LIBCXX)
if(NOT ${projectPrefix}LIBCXX)
add_example(glide_computer_example mp-units::core-fmt mp-units::si-international glide_computer)
target_compile_definitions(glide_computer_example-aliases PRIVATE
UNITS_NO_LITERALS
UNITS_NO_REFERENCES
${projectPrefix}NO_LITERALS
${projectPrefix}NO_REFERENCES
)
find_package(wg21-linear_algebra CONFIG REQUIRED)
+2 -2
View File
@@ -29,8 +29,8 @@ function(add_example target)
add_executable(${target} ${target}.cpp)
target_link_libraries(${target} PRIVATE ${ARGN})
target_compile_definitions(${target} PRIVATE
UNITS_NO_LITERALS
UNITS_NO_ALIASES
${projectPrefix}NO_LITERALS
${projectPrefix}NO_ALIASES
)
endfunction()
+5 -5
View File
@@ -29,8 +29,8 @@ function(add_example target)
add_executable(${target}-literals ${target}.cpp)
target_link_libraries(${target}-literals PRIVATE ${ARGN})
target_compile_definitions(${target}-literals PRIVATE
UNITS_NO_REFERENCES
UNITS_NO_ALIASES
${projectPrefix}NO_REFERENCES
${projectPrefix}NO_ALIASES
)
endfunction()
@@ -43,11 +43,11 @@ add_example(foot_pound_second mp-units::core-fmt mp-units::si-fps)
add_example(total_energy mp-units::core-io mp-units::si mp-units::isq-natural)
add_example(unknown_dimension mp-units::core-io mp-units::si)
if(NOT UNITS_LIBCXX)
if(NOT ${projectPrefix}LIBCXX)
add_example(glide_computer_example mp-units::core-fmt mp-units::si-international glide_computer)
target_compile_definitions(glide_computer_example-literals PRIVATE
UNITS_NO_REFERENCES
UNITS_NO_ALIASES
${projectPrefix}NO_REFERENCES
${projectPrefix}NO_ALIASES
)
find_package(wg21-linear_algebra CONFIG REQUIRED)
+5 -5
View File
@@ -29,8 +29,8 @@ function(add_example target)
add_executable(${target}-references ${target}.cpp)
target_link_libraries(${target}-references PRIVATE ${ARGN})
target_compile_definitions(${target}-references PRIVATE
UNITS_NO_LITERALS
UNITS_NO_ALIASES
${projectPrefix}NO_LITERALS
${projectPrefix}NO_ALIASES
)
endfunction()
@@ -43,11 +43,11 @@ add_example(foot_pound_second mp-units::core-fmt mp-units::si-fps)
add_example(total_energy mp-units::core-io mp-units::si mp-units::isq-natural)
add_example(unknown_dimension mp-units::core-io mp-units::si)
if(NOT UNITS_LIBCXX)
if(NOT ${projectPrefix}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_NO_LITERALS
UNITS_NO_ALIASES
${projectPrefix}NO_LITERALS
${projectPrefix}NO_ALIASES
)
find_package(wg21-linear_algebra CONFIG REQUIRED)