Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Tests / RunCMake / CommandLine / trycompile-clean.cmake
1 enable_language(C)
2
3 # Look for a source tree left by enable_language internal checks.
4 set(scratch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeScratch)
5 file(GLOB_RECURSE remnants ${scratch}/TryCompile-*/*)
6 if(remnants)
7   message(FATAL_ERROR "try_compile should not leave artifacts behind")
8 endif()