summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-30 14:52:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-30 14:52:33 (GMT)
commit89a3d33d11bfdb277b84db76881e4e1a7e46c310 (patch)
tree8fc70f6d3058c6665f7ae17e480ec0396a3a24a1 /Tests/RunCMake
parent5be9a8cfd5b845ca346ce63f6a4cd704dcf64f36 (diff)
parentaebfbcaa4650ec6f540cc53b96d44cdfb87d82a1 (diff)
downloadCMake-89a3d33d11bfdb277b84db76881e4e1a7e46c310.zip
CMake-89a3d33d11bfdb277b84db76881e4e1a7e46c310.tar.gz
CMake-89a3d33d11bfdb277b84db76881e4e1a7e46c310.tar.bz2
Merge topic 'automoc-using-depfiles'
aebfbcaa46 AutoGen: Use depfiles for the XXX_autogen ninja targets f765fdea03 AutoGen: Use moc's feature to output dependencies f8c505d4b3 Add a parser for GCC-style depfiles Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Jan Niklas Hasse <jhasse@bixense.com> Merge-request: !4221
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Qt5.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
index 6a80b1d..3a1c7f5 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
@@ -11,8 +11,20 @@ target_link_libraries(exe PRIVATE Qt5::Core)
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
generate_output_files(exe)
+set(moc_writes_depfiles 0)
+if(Qt5Core_VERSION VERSION_GREATER_EQUAL "5.15.0")
+ set(moc_writes_depfiles 1)
+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)
+ list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/include_${c}/moc_qt5.cpp.d")
+ endif()
endforeach()
file(APPEND "${CMAKE_BINARY_DIR}/target_files.cmake" "set(AUTOGEN_FILES [==[${autogen_files}]==])\n")