Debian Codegraph @

cmake/tribits/examples/RawAndTribitsHelloWorld/hello_world/CMakeLists.txt

raw
1 include_tribits_build()
2
3 # Build and install library
4 set(HEADERS hello_world_lib.hpp)
5 set(SOURCES hello_world_lib.cpp)
6 add_library(hello_world_lib ${SOURCES})
7 install(TARGETS hello_world_lib DESTINATION lib)
8 install(FILES ${HEADERS} DESTINATION include)
9
10 # Build and install user executable
11 add_executable(hello_world hello_world_main.cpp)
12 target_link_libraries(hello_world hello_world_lib)
13 install(TARGETS hello_world DESTINATION bin)
14
15 # Test the executable
16 add_test(test ${CMAKE_CURRENT_BINARY_DIR}/hello_world)
17 set_tests_properties(test PROPERTIES PASS_REGULAR_EXPRESSION "Hello World")
18
19 # Build and run some unit tests
20 add_executable(unit_tests hello_world_unit_tests.cpp)
21 target_link_libraries(unit_tests hello_world_lib)
22 add_test(unit_test ${CMAKE_CURRENT_BINARY_DIR}/unit_tests)
23 set_tests_properties(unit_test
24 PROPERTIES PASS_REGULAR_EXPRESSION "All unit tests passed")