summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-11-27 15:59:20 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-12-13 15:52:07 (GMT)
commite0478cc64623fbfcb7dcd748f27b94cc8473fa1a (patch)
treefa28877d7db948f5aee23a9dbe0bc042d562150b /Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
parent5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2 (diff)
downloadCMake-e0478cc64623fbfcb7dcd748f27b94cc8473fa1a.zip
CMake-e0478cc64623fbfcb7dcd748f27b94cc8473fa1a.tar.gz
CMake-e0478cc64623fbfcb7dcd748f27b94cc8473fa1a.tar.bz2
Tests: Add test for Multi-Configuration Ninja generator
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig/Qt5.cmake')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Qt5.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
new file mode 100644
index 0000000..6a80b1d
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
@@ -0,0 +1,18 @@
+enable_language(CXX)
+
+find_package(Qt5Core REQUIRED)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOMOC_COMPILER_PREDEFINES OFF)
+
+add_executable(exe qt5.cxx)
+target_link_libraries(exe PRIVATE Qt5::Core)
+
+include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
+generate_output_files(exe)
+
+set(autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/mocs_compilation.cpp")
+foreach(c IN LISTS CMAKE_CONFIGURATION_TYPES)
+ list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/include_${c}/moc_qt5.cpp")
+endforeach()
+file(APPEND "${CMAKE_BINARY_DIR}/target_files.cmake" "set(AUTOGEN_FILES [==[${autogen_files}]==])\n")