CMake/Tests/RunCMake/BuildDepends/RepeatCMake-Custom-Script.cmake
Brad King b8b6573db8 Xcode: Use deterministic object ids for script build phases
The Xcode "new build system" only considers a script build phase up to
date if it has run before, even if outputs are newer than inputs.  Use a
deterministic object id for script build phases associated with custom
commands so that they do not need to re-run after CMake re-generates the
project.

Fixes: #21669
2021-01-06 18:46:30 -05:00

5 lines
196 B
CMake

if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/exists-for-build2")
message(FATAL_ERROR "Custom command incorrectly re-ran after CMake re-ran!")
endif()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/out.txt")