Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /JETSCAPE/jail/trentotest/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 ##############
0002 # Unit Tests
0003 ##############
0004 
0005 ###### Begin: Helper macro to add unittests
0006 macro(js_add_test name depends)
0007    add_test(NAME ${name} COMMAND ${ARGN})
0008    add_custom_target(run_${name}
0009       COMMAND ${ARGN} ${UNITTEST_ARGS}
0010       DEPENDS ${depends}
0011       COMMENT "Executing test ${name}"
0012       VERBATIM
0013       )
0014 endmacro()
0015 
0016 macro(js_add_exe name)
0017   add_executable(${name} ${name}.cc)
0018   target_link_libraries(${name} gtest gtest_main)
0019   target_link_libraries(${name} JetScape)
0020 endmacro()
0021 
0022 macro(js_add_unittest name)
0023    js_add_exe(${name})
0024    js_add_test(${name} ${name} ${name})
0025 endmacro()
0026 ###### End: Helper macro to add unittests
0027 
0028 
0029 ###### Now it is easy to add unittest for test_name.cc by js_add_unittest(test_name)
0030 js_add_unittest(TrentoInitial)
0031 js_add_unittest(TrentoInitialFromXML)