diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-01-14 10:22:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-28 16:16:11 (GMT) |
commit | aebfbcaa4650ec6f540cc53b96d44cdfb87d82a1 (patch) | |
tree | 31c33894501d71ceb049b2293daecb4a7bf4ede0 /Tests/RunCMake/NinjaMultiConfig | |
parent | f765fdea032b820f82789485172616c1456fb815 (diff) | |
download | CMake-aebfbcaa4650ec6f540cc53b96d44cdfb87d82a1.zip CMake-aebfbcaa4650ec6f540cc53b96d44cdfb87d82a1.tar.gz CMake-aebfbcaa4650ec6f540cc53b96d44cdfb87d82a1.tar.bz2 |
AutoGen: Use depfiles for the XXX_autogen ninja targets
The XXX_autogen targets are implemented as utility commands, which
means they always run, even if there weren't any changes.
For the Ninja generator and Qt >= 5.15 we're taking a different
approach: This commit adds custom commands that create
XXX_autogen/timestamp files. Those custom commands have a depfile
assigned that is generated from the depfiles that were created by moc.
The XXX_autogen targets merely wrap the XXX_autogen/timestamp custom
commands.
Fixes: #18749
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/Qt5.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake index dfc0f50..3a1c7f5 100644 --- a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake @@ -17,6 +17,10 @@ if(Qt5Core_VERSION VERSION_GREATER_EQUAL "5.15.0") endif() set(autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/mocs_compilation.cpp") +if(moc_writes_depfiles) + list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/deps") + list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/timestamp") +endif() foreach(c IN LISTS CMAKE_CONFIGURATION_TYPES) list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/include_${c}/moc_qt5.cpp") if(moc_writes_depfiles) |