COMMAND ${CMAKE_SOURCE_DIR}/test/run ${name}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
- set_tests_properties("producttest.${name}" PROPERTIES
+ set_tests_properties(
+ "producttest.${name}"
+ PROPERTIES
ENVIRONMENT "CCACHE=${CMAKE_BINARY_DIR}/ccache;EXIT_IF_SKIPPED=true")
if(${CMAKE_VERSION} VERSION_LESS "3.9")
- # Older cmake versions treat skipped tests as errors.
- # Therefore resort to parsing output for those cases.
- # Exit code is not considered.
- # Skipped tests will appear as "Passed".
- set_tests_properties("producttest.${name}" PROPERTIES
+ # Older CMake versions treat skipped tests as errors. Therefore, resort to
+ # parsing output for those cases (exit code is not considered). Skipped
+ # tests will appear as "Passed".
+ set_tests_properties(
+ "producttest.${name}"
+ PROPERTIES
PASS_REGULAR_EXPRESSION "PASSED|Passed|Skipped"
FAIL_REGULAR_EXPRESSION "[Ww]arning|[Ff]ail|[Er]rror")
else()
- set_tests_properties(
- "producttest.${name}" PROPERTIES
- SKIP_RETURN_CODE 125)
+ set_tests_properties("producttest.${name}" PROPERTIES SKIP_RETURN_CODE 125)
endif()
endfunction()