summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-02-17 15:51:48 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-02-17 15:51:48 (GMT)
commit665c8fde8bd2e015c9c01d095cd31987f78f74e4 (patch)
tree446606bbe0f7d13c8cff97110ebdcfab6e66a504 /Tests
parent6d00a2de7b019b17bd9735108c1e80c2031f345a (diff)
parent7abc3d61acf5be976ce5b9f2c13f48f7f61e8e76 (diff)
downloadCMake-665c8fde8bd2e015c9c01d095cd31987f78f74e4.zip
CMake-665c8fde8bd2e015c9c01d095cd31987f78f74e4.tar.gz
CMake-665c8fde8bd2e015c9c01d095cd31987f78f74e4.tar.bz2
Merge branch 'backport-ninja-multi-framework-dependency-autogen-fix' into ninja-multi-framework-dependency-autogen-fix
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)