summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/debug-trycompile.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CommandLine/debug-trycompile.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/debug-trycompile.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/RunCMake/CommandLine/debug-trycompile.cmake b/Tests/RunCMake/CommandLine/debug-trycompile.cmake
index a3835a7..9619ba8 100644
--- a/Tests/RunCMake/CommandLine/debug-trycompile.cmake
+++ b/Tests/RunCMake/CommandLine/debug-trycompile.cmake
@@ -1,5 +1,8 @@
enable_language(C)
+
# Look for a source tree left by enable_language internal checks.
-if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/CMakeLists.txt)
+set(scratch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeScratch)
+file(GLOB_RECURSE remnants ${scratch}/TryCompile-*/CMakeLists.txt)
+if(NOT remnants)
message(FATAL_ERROR "--debug-trycompile should leave the source behind")
endif()