Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/Tests/UnitTests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # add a unittest executable w/ default dependencies and register it.
0002 
0003 # the common libraries which are linked to every unittest can be
0004 # extended by setting the `unittest_extra_libraries` variables before
0005 # calling the macro.
0006 
0007 add_custom_target(unit_tests)
0008 
0009 macro(add_unittest _name _source)
0010     # automatically prefix the target name
0011     set(_target "ActsUnitTest${_name}")
0012     add_executable(${_target} ${_source})
0013     # define required BOOST_TEST_... macros here to ensure consistent names
0014     target_compile_definitions(${_target} PRIVATE "-DBOOST_TEST_DYN_LINK")
0015     set_source_files_properties(
0016         ${_source}
0017         PROPERTIES COMPILE_DEFINITIONS "BOOST_TEST_MODULE=${_target}"
0018     )
0019     target_include_directories(${_target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
0020     target_link_libraries(
0021         ${_target}
0022         PRIVATE
0023             ActsCore
0024             ActsTestsCommonHelpers
0025             Boost::unit_test_framework
0026             ${unittest_extra_libraries}
0027     )
0028     # register as unittest executable
0029     add_test(NAME ${_name} COMMAND ${_target})
0030     add_dependencies(unit_tests ${_target})
0031 endmacro()
0032 
0033 add_subdirectory(Core)
0034 add_subdirectory_if(Examples ACTS_BUILD_EXAMPLES AND ACTS_BUILD_EXAMPLES_UNITTESTS)
0035 add_subdirectory_if(Benchmarks ACTS_BUILD_BENCHMARKS)
0036 add_subdirectory_if(Fatras ACTS_BUILD_FATRAS)
0037 add_subdirectory(Plugins)
0038 add_subdirectory_if(Alignment ACTS_BUILD_ALIGNMENT)