summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-18 17:35:53 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-18 17:46:39 (GMT)
commit1c3d2d09516f93707ce2f62f02e5ce52cd279cb1 (patch)
tree2ede4d6aa95059f74769d530075037702cf55ef1 /Tests/QtAutogen
parent542884e527f073368c4b2af2f09b72b1be2181c4 (diff)
downloadCMake-1c3d2d09516f93707ce2f62f02e5ce52cd279cb1.zip
CMake-1c3d2d09516f93707ce2f62f02e5ce52cd279cb1.tar.gz
CMake-1c3d2d09516f93707ce2f62f02e5ce52cd279cb1.tar.bz2
Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system"
This test case enables AUTOMOC on the same sources in two separate targets. This causes the `moc_*.cpp` generation custom commands to be added to multiple `_autogen` targets, which is not allowed by the Xcode "new build system". Skip the part of the test that triggers this problem for now. Issue: #21205
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r--Tests/QtAutogen/MocSkipSource/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/QtAutogen/MocSkipSource/CMakeLists.txt b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt
index 454e896..c886736 100644
--- a/Tests/QtAutogen/MocSkipSource/CMakeLists.txt
+++ b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt
@@ -29,6 +29,13 @@ set_property(SOURCE qItemD.hpp PROPERTY SKIP_AUTOGEN ON)
add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc})
set_property(TARGET skipMocA PROPERTY AUTOMOC ON)
target_link_libraries(skipMocA ${QT_LIBRARIES})
+
+if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
+ # FIXME: Fix AUTOMOC for the Xcode "new build system" to avoid
+ # duplicating custom commands in multiple _autogen targets.
+ return()
+endif()
+
# AUTOMOC and AUTOUIC enabled
add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc})
set_property(TARGET skipMocB PROPERTY AUTOMOC ON)