]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Tweak CMakeLists.txt
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 22 Jun 2020 20:18:23 +0000 (22:18 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 23 Jun 2020 19:44:37 +0000 (21:44 +0200)
test/CMakeLists.txt

index 8ddc2172c5d02ff82d2d572e64484145544bd4be..889ddf6610a24172815e8c21a9f23caf821d98c6 100644 (file)
@@ -4,21 +4,22 @@ function(addtest name)
     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()