summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-18 16:20:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-18 16:20:56 (GMT)
commit2ee4b288ad9727b82eaa5c5b0f008ba00bf78e2d (patch)
tree03e716ad7ea5311c4c9d1b19c03f7a5d7cb3d02b /Tests
parent3276f85fd774035221d00b291bfe0c624f6a4831 (diff)
parent665c8fde8bd2e015c9c01d095cd31987f78f74e4 (diff)
downloadCMake-2ee4b288ad9727b82eaa5c5b0f008ba00bf78e2d.zip
CMake-2ee4b288ad9727b82eaa5c5b0f008ba00bf78e2d.tar.gz
CMake-2ee4b288ad9727b82eaa5c5b0f008ba00bf78e2d.tar.bz2
Merge topic 'ninja-multi-framework-dependency-autogen-fix'
665c8fde8b Merge branch 'backport-ninja-multi-framework-dependency-autogen-fix' into ninja-multi-framework-dependency-autogen-fix 7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4363
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/FrameworkDependencyAutogen.cmake20
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake7
2 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/FrameworkDependencyAutogen.cmake b/Tests/RunCMake/NinjaMultiConfig/FrameworkDependencyAutogen.cmake
new file mode 100644
index 0000000..75e21b9
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/FrameworkDependencyAutogen.cmake
@@ -0,0 +1,20 @@
+enable_language(C)
+
+set(CMAKE_LINK_DEPENDS_NO_SHARED ON)
+
+set(QT_VERSION_MAJOR 6)
+set(fake_moc_path "${CMAKE_CURRENT_BINARY_DIR}/fake_moc")
+file(WRITE "${fake_moc_path}" "")
+
+add_library(test1 SHARED simplelib.c)
+add_library(test2 SHARED empty.c)
+target_link_libraries(test2 test1)
+
+set_target_properties(test1 test2 PROPERTIES
+ FRAMEWORK ON
+ AUTOMOC ON
+ AUTOMOC_EXECUTABLE "${fake_moc_path}"
+ )
+
+include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
+generate_output_files(test1 test2)
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 9058b11..a608e9e 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -198,6 +198,13 @@ unset(RunCMake_TEST_OPTIONS)
include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
run_cmake_build(Framework framework Debug all)
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/FrameworkDependencyAutogen-build)
+set(RunCMake_TEST_OPTIONS "-DCMAKE_NMC_CROSS_CONFIGS=all")
+run_cmake_configure(FrameworkDependencyAutogen)
+unset(RunCMake_TEST_OPTIONS)
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+run_cmake_build(FrameworkDependencyAutogen framework Release test2:Debug)
+
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandGenerator-build)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;MinSizeRel\\;RelWithDebInfo;-DCMAKE_NMC_CROSS_CONFIGS=all")
run_cmake_configure(CustomCommandGenerator)