mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 15:19:51 -05:00
Autogen: Restore mocs_compilation in OBJECT libraries
Since commit f65f20938c (Autogen: Avoid processing CSharp targets,
2020-11-12, v3.20.0-rc1~301^2) we collect all sources for a target
earlier than previously. Clear the sources cache so that it will be
re-computed later after AUTOGEN processing.
Fixes: #22085
This commit is contained in:
@@ -16,3 +16,8 @@ target_compile_features(b PRIVATE ${QT_COMPILE_FEATURES})
|
||||
# Executable with OBJECT library generator expressions
|
||||
add_executable(someProgram main.cpp $<TARGET_OBJECTS:a> $<TARGET_OBJECTS:b>)
|
||||
target_link_libraries(someProgram ${QT_LIBRARIES})
|
||||
|
||||
# Executable without its own AUTOMOC.
|
||||
add_executable(someProgram2 main.cpp)
|
||||
target_link_libraries(someProgram2 PRIVATE a b ${QT_LIBRARIES})
|
||||
set_property(TARGET someProgram2 PROPERTY AUTOMOC OFF)
|
||||
|
||||
Reference in New Issue
Block a user