Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9020 for code/branches/testing


Ignore:
Timestamp:
Feb 25, 2012, 8:13:19 PM (13 years ago)
Author:
landauf
Message:

sample tests with boost test

Location:
code/branches/testing
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/cmake/LibraryConfig.cmake

    r8412 r9020  
    162162                              1.44 1.44.0 1.45 1.45.0 1.46 1.46.0 1.46.1)
    163163IF(NOT TARDIS)
     164  # optional
     165  FIND_PACKAGE(Boost 1.40 COMPONENTS unit_test_framework)
     166  # required
    164167  FIND_PACKAGE(Boost 1.40 REQUIRED thread filesystem system date_time)
    165168ENDIF()
  • code/branches/testing/test/CMakeLists.txt

    r9017 r9020  
    11ENABLE_TESTING()
    22
     3ADD_CUSTOM_TARGET(test COMMAND ${CMAKE_CTEST_COMMAND})
     4
    35ADD_EXECUTABLE(sample_test EXCLUDE_FROM_ALL SampleTest.cc)
    4 ADD_TEST(test1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sample_test)
    5 ADD_TEST(test2 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sample_test)
    6 ADD_TEST(test3 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sample_test)
     6ADD_DEPENDENCIES(test sample_test)
    77
    8 ADD_CUSTOM_TARGET(test COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS sample_test)
    9 #ADD_DEPENDENCIES(test sample_test)
     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 TracChangeset for help on using the changeset viewer.