Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/testing/test/CMakeLists.txt @ 9021

Last change on this file since 9021 was 9020, checked in by landauf, 13 years ago

sample tests with boost test

File size: 711 bytes
Line 
1ENABLE_TESTING()
2
3ADD_CUSTOM_TARGET(test COMMAND ${CMAKE_CTEST_COMMAND})
4
5ADD_EXECUTABLE(sample_test EXCLUDE_FROM_ALL SampleTest.cc)
6ADD_DEPENDENCIES(test sample_test)
7
8ADD_TEST(test1a ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sample_test)
9ADD_TEST(test1b ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sample_test)
10ADD_TEST(test1c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sample_test)
11
12
13IF(Boost_UNIT_TEST_FRAMEWORK_FOUND)
14  INCLUDE_DIRECTORIES(
15    ${Boost_INCLUDE_DIRS}
16  )
17  ADD_EXECUTABLE(boost_test EXCLUDE_FROM_ALL BoostTest.cc)
18  TARGET_LINK_LIBRARIES(boost_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
19  ADD_DEPENDENCIES(test boost_test)
20
21  ADD_TEST(test2 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/boost_test)
22ENDIF()
Note: See TracBrowser for help on using the repository browser.