This repository was archived by the owner on Aug 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ project(mapping_core
55
66# CMake Settings
77cmake_minimum_required (VERSION 3.7 )
8+ cmake_policy (SET CMP0079 NEW )
89SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake ${CMAKE_MODULE_PATH} )
910
1011## Debug
@@ -47,8 +48,15 @@ download_project(PROJ cpptoml
4748 )
4849add_subdirectory (${cpptoml_SOURCE_DIR} ${cpptoml_BINARY_DIR} EXCLUDE_FROM_ALL )
4950
51+ # Modules
52+ set (MAPPING_CORE_PATH ${CMAKE_SOURCE_DIR} CACHE PATH "This is the mapping-core directory." FORCE )
53+ foreach (mapping_module IN ITEMS ${MAPPING_MODULES} )
54+ message (STATUS "Loading Module `${mapping_module} `" )
55+ add_subdirectory (${MAPPING_MODULE_PATH} /${mapping_module} target /modules/${mapping_module} )
56+ endforeach (mapping_module )
57+
5058add_subdirectory (src )
5159
5260include (CTest )
5361enable_testing ()
54- add_subdirectory (test )
62+ add_subdirectory (test )
Original file line number Diff line number Diff line change @@ -290,12 +290,6 @@ find_package(Fcgi++ REQUIRED)
290290target_link_libraries (mapping_core_services_lib ${Fcgi++_LIBRARIES} )
291291target_include_directories (mapping_core_services_lib PRIVATE ${Fcgi++_INCLUDE_DIRS} )
292292
293- # Modules
294- set (MAPPING_CORE_PATH ${CMAKE_SOURCE_DIR} CACHE PATH "This is the mapping-core directory." FORCE )
295- foreach (mapping_module IN ITEMS ${MAPPING_MODULES} )
296- message (STATUS "Loading Module `${mapping_module} `" )
297- add_subdirectory (../${MAPPING_MODULE_PATH}/${mapping_module} target /modules/${mapping_module} )
298- endforeach (mapping_module )
299293## Base
300294foreach (mapping_core_addition IN ITEMS ${MAPPING_ADD_TO_BASE_OBJECTS} )
301295 message (STATUS "Adding ${mapping_core_addition} to base." )
Original file line number Diff line number Diff line change @@ -57,6 +57,15 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
5757add_subdirectory (${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL )
5858target_link_libraries (mapping_core_unittests_lib gtest )
5959
60+
61+ foreach (mapping_test_addition IN ITEMS ${MAPPING_ADD_TO_UNITTESTS_LIBRARIES_INTERNAL} )
62+ message (STATUS "Adding ${mapping_test_addition} to tests." )
63+ # Provide dependencies to foreign test library
64+ target_link_libraries_internal (${mapping_test_addition} mapping_core_unittests_lib )
65+ # Append foregin tests to unit tests
66+ target_link_libraries_internal (mapping_unittests ${mapping_test_addition} )
67+ endforeach (mapping_test_addition )
68+
6069# Define the build of the test executables as one of the tests s.t. they are built on `make test`
6170# TODO: use multiple threads for building
6271add_test (NAME build_mapping_unittests COMMAND "${CMAKE_COMMAND} " --build ${CMAKE_BINARY_DIR}
You can’t perform that action at this time.
0 commit comments