mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 01:01:12 +00:00
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
This commit is contained in:
@@ -29,6 +29,13 @@ set_property(SOURCE qItemD.hpp PROPERTY SKIP_AUTOGEN ON)
|
|||||||
add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc})
|
add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc})
|
||||||
set_property(TARGET skipMocA PROPERTY AUTOMOC ON)
|
set_property(TARGET skipMocA PROPERTY AUTOMOC ON)
|
||||||
target_link_libraries(skipMocA ${QT_LIBRARIES})
|
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
|
# AUTOMOC and AUTOUIC enabled
|
||||||
add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc})
|
add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc})
|
||||||
set_property(TARGET skipMocB PROPERTY AUTOMOC ON)
|
set_property(TARGET skipMocB PROPERTY AUTOMOC ON)
|
||||||
|
|||||||
Reference in New Issue
Block a user