]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Place temporary test dirs in CMAKE_BINARY_DIR
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 12 Jun 2020 18:45:47 +0000 (20:45 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 14 Jun 2020 08:57:18 +0000 (10:57 +0200)
That’s where the developer performs the build so I think that it makes
more sense this way.

test/CMakeLists.txt

index 0df3ccb41d3a38405d4712f2077e3f99002a3072..996003ccbb12303c286172874dac0d51f1ac40e4 100644 (file)
@@ -1,7 +1,8 @@
 function(addtest name)
   add_test(NAME "producttest.${name}"
-    COMMAND test/run ${name}
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+    COMMAND ${CMAKE_SOURCE_DIR}/test/run ${name}
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+  )
   set(
     environment
     CCACHE=${CMAKE_BINARY_DIR}/ccache