test.cmake.in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. cmake_minimum_required(VERSION 2.8)
  2. # CTestConfig.cmake settings:
  3. set(CTEST_PROJECT_NAME "SmallAndFast")
  4. # Intentionally leave out other upload-related CTestConfig.cmake settings
  5. # so that the ctest_submit call below fails with an error message...
  6. #
  7. set(CTEST_DROP_METHOD "@drop_method@")
  8. # Settings:
  9. set(CTEST_USE_LAUNCHERS 1)
  10. # Emit these compiler warnings:
  11. set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -Wall")
  12. set(CTEST_SITE "@SITE@")
  13. set(CTEST_BUILD_NAME "CTestTestLaunchers-@drop_method@")
  14. set(CTEST_SOURCE_DIRECTORY "@source@")
  15. set(CTEST_BINARY_DIRECTORY "@build@")
  16. set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
  17. set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
  18. set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
  19. set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
  20. set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
  21. set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
  22. CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
  23. CTEST_START(Experimental)
  24. # explicitly do not use CTEST_UPDATE - avoid network activity
  25. CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}"
  26. OPTIONS "-DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS};-DSAF_INTENTIONAL_COMPILE_ERROR:BOOL=ON;-DSAF_INTENTIONAL_COMPILE_WARNING:BOOL=ON"
  27. RETURN_VALUE res)
  28. CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
  29. CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
  30. CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" @ctest_coverage_labels_args@ RETURN_VALUE res)
  31. # ok to call ctest_submit - still avoids network activity because there is
  32. # not a valid drop location given above...
  33. CTEST_SUBMIT(RETURN_VALUE res)
  34. # Add coverage for the new APPEND arg to ctest_start:
  35. #
  36. CTEST_START(Experimental APPEND)