build: core library and each system separated to dedicated CMake targets
Refers to #249
This commit is contained in:
1 parent
7ee0e3ff90
commit
221883bb25
206 files changed
+547
-121
No files matched your search
@@ -32,16 +32,14 @@ add_executable(unit_tests_runtime
|
||||
fmt_units_test.cpp
|
||||
distribution_test.cpp
|
||||
)
|
||||
target_link_libraries(unit_tests_runtime
|
||||
PRIVATE
|
||||
mp-units::mp-units
|
||||
Catch2::Catch2
|
||||
target_link_libraries(unit_tests_runtime PRIVATE
|
||||
mp-units::mp-units
|
||||
Catch2::Catch2
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
target_compile_options(unit_tests_runtime
|
||||
PRIVATE
|
||||
/wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
||||
target_compile_options(unit_tests_runtime PRIVATE
|
||||
/wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -31,13 +31,11 @@ if(NOT UNITS_LIBCXX)
|
||||
quantity_point_kind_test.cpp
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(unit_tests_static_truncating
|
||||
PRIVATE
|
||||
mp-units::mp-units
|
||||
target_link_libraries(unit_tests_static_truncating PRIVATE
|
||||
mp-units::mp-units
|
||||
)
|
||||
target_compile_options(unit_tests_static_truncating
|
||||
PRIVATE
|
||||
$<IF:$<CXX_COMPILER_ID:MSVC>,/wd4242 /wd4244,-Wno-conversion>
|
||||
target_compile_options(unit_tests_static_truncating PRIVATE
|
||||
$<IF:$<CXX_COMPILER_ID:MSVC>,/wd4242 /wd4244,-Wno-conversion>
|
||||
)
|
||||
|
||||
add_library(unit_tests_static
|
||||
@@ -71,8 +69,7 @@ if(NOT UNITS_LIBCXX)
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(unit_tests_static
|
||||
PRIVATE
|
||||
unit_tests_static_truncating
|
||||
mp-units::mp-units
|
||||
target_link_libraries(unit_tests_static PRIVATE
|
||||
unit_tests_static_truncating
|
||||
mp-units::mp-units
|
||||
)
|
||||
Reference in new issue
Block a user