CMake/Tests/RunCMake/try_compile/RerunCMake.cmake
Brad King daf95a3827 try_compile: Test that CMake re-runs on input change
With the Makefile and Ninja generators we expect that touching the input
source file for a try_compile will cause CMake to re-run on the next
build.  Extend the RunCMake.try_compile test with a case covering this.
Also check that CMake does not re-run if nothing has changed.
2015-01-27 11:18:36 -05:00

8 lines
220 B
CMake

message("Running CMake on RerunCMake") # write to stderr if cmake reruns
enable_language(C)
try_compile(res
"${CMAKE_CURRENT_BINARY_DIR}"
SOURCES "${CMAKE_CURRENT_BINARY_DIR}/TryCompileInput.c"
)
message("${res}")