summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Make/DetectJobServer-absent.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Make/DetectJobServer-absent.cmake')
-rw-r--r--Tests/RunCMake/Make/DetectJobServer-absent.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/Make/DetectJobServer-absent.cmake b/Tests/RunCMake/Make/DetectJobServer-absent.cmake
new file mode 100644
index 0000000..e3dddc0
--- /dev/null
+++ b/Tests/RunCMake/Make/DetectJobServer-absent.cmake
@@ -0,0 +1,13 @@
+# Verifies that the jobserver connection is absent
+add_custom_command(OUTPUT custom_command.txt
+ JOB_SERVER_AWARE OFF
+ COMMENT "Should not detect jobserver"
+ COMMAND ${DETECT_JOBSERVER} --absent "custom_command.txt"
+)
+
+# trigger the custom command to run
+add_custom_target(dummy ALL
+ JOB_SERVER_AWARE OFF
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/custom_command.txt
+ COMMAND ${DETECT_JOBSERVER} --absent "custom_target.txt"
+)