diff options
author | Brad King <brad.king@kitware.com> | 2020-02-18 16:20:48 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-18 11:20:56 -0500 |
commit | 2dad438980ee66f1fa51662dde761902c76335d1 (patch) | |
tree | ed9a2004f21e015926b20749077fc1da6b996f05 /Tests | |
parent | bf718ccd6068c33a6762667e0b2cf765b669e5ab (diff) | |
parent | 7abc3d61acf5be976ce5b9f2c13f48f7f61e8e76 (diff) | |
download | cmake-2dad438980ee66f1fa51662dde761902c76335d1.tar.gz |
Merge topic 'ninja-multi-framework-dependency-autogen-fix' into release-3.17
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.cmake | 20 | ||||
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake | 7 |
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 0000000000..75e21b98c5 --- /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 9058b11354..a608e9e160 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) |