summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-06 16:15:35 -0500
committerBrad King <brad.king@kitware.com>2021-01-06 18:46:30 -0500
commitb8b6573db81327fc1800d9b1a92eb97820d7f972 (patch)
tree47a062d7060f00bf4d0eedd6a8bbd6426a4fac14 /Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake
parent2892228dc9e70aab3a724058a043068f87c860f6 (diff)
downloadcmake-b8b6573db81327fc1800d9b1a92eb97820d7f972.tar.gz
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
Diffstat (limited to 'Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake')
-rw-r--r--Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake b/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake
new file mode 100644
index 0000000000..697e485467
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake
@@ -0,0 +1,5 @@
+add_custom_command(OUTPUT out.txt
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/RepeatCMake-Custom-Script.cmake
+ DEPENDS ${CMAKE_CURRENT_LIST_DIR}/RepeatCMake-Custom-Script.cmake
+ )
+add_custom_target(drive ALL DEPENDS out.txt)