summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-15 15:21:39 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-18 17:02:19 (GMT)
commit1806cdd17c17fc202b4d7c195b1830cfc038a3a2 (patch)
treeb4a2063cf84cd2784e045429165b40ddbda18bea /Tests/CustomCommand
parent8d5f4c4db93959f77dc8fb185e4630df4ec26d98 (diff)
downloadCMake-1806cdd17c17fc202b4d7c195b1830cfc038a3a2.zip
CMake-1806cdd17c17fc202b4d7c195b1830cfc038a3a2.tar.gz
CMake-1806cdd17c17fc202b4d7c195b1830cfc038a3a2.tar.bz2
Tests: Avoid duplicate custom commands for Xcode "new build system"
Diffstat (limited to 'Tests/CustomCommand')
-rw-r--r--Tests/CustomCommand/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 53d56bf..c1a7a57 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -514,6 +514,14 @@ add_custom_target(UseConsoleTarget ALL
USES_TERMINAL
)
+if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
+ # Xcode's "new build system" does not support multiple targets
+ # producing the same custom command output.
+ add_custom_target(GenPath DEPENDS "${gen_path}")
+ add_dependencies(NormDepends GenPath)
+ add_dependencies(UseConsole GenPath)
+endif()
+
# Test COMMAND_EXPAND_LISTS
set(cmp_args "1ARG=COMMAND_EXPAND_LISTS" "2ARG=test" "3ARG=outfile"
"4ARG=content")