CMakeLists.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. add_test(NAME FindBoost.Test COMMAND
  2. ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  3. --build-and-test
  4. "${CMake_SOURCE_DIR}/Tests/FindBoost/Test"
  5. "${CMake_BINARY_DIR}/Tests/FindBoost/Test"
  6. ${build_generator_args}
  7. --build-project TestFindBoost
  8. --build-options ${build_options}
  9. --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  10. )
  11. add_test(NAME FindBoost.TestFail COMMAND
  12. ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  13. --build-and-test
  14. "${CMake_SOURCE_DIR}/Tests/FindBoost/TestFail"
  15. "${CMake_BINARY_DIR}/Tests/FindBoost/TestFail"
  16. ${build_generator_args}
  17. --build-project TestFailFindBoost
  18. --build-options ${build_options}
  19. --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  20. )
  21. set_tests_properties(FindBoost.TestFail PROPERTIES
  22. PASS_REGULAR_EXPRESSION "Could not find the following Boost libraries:[ \t\n]+boost_foobar")
  23. add_test(NAME FindBoost.TestHeaders COMMAND
  24. ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  25. --build-and-test
  26. "${CMake_SOURCE_DIR}/Tests/FindBoost/TestHeaders"
  27. "${CMake_BINARY_DIR}/Tests/FindBoost/TestHeaders"
  28. ${build_generator_args}
  29. --build-project TestFindBoostHeaders
  30. --build-options ${build_options}
  31. --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  32. )