diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-13 16:12:34 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-17 13:24:57 (GMT) |
commit | 7abc3d61acf5be976ce5b9f2c13f48f7f61e8e76 (patch) | |
tree | 2208f8fcb6dd079fdc3585926c145f3ca578b543 /Tests/RunCMake/NinjaMultiConfig | |
parent | b88a671f75bdd1cb4f24166a9a6d98a678de1e62 (diff) | |
download | CMake-7abc3d61acf5be976ce5b9f2c13f48f7f61e8e76.zip CMake-7abc3d61acf5be976ce5b9f2c13f48f7f61e8e76.tar.gz CMake-7abc3d61acf5be976ce5b9f2c13f48f7f61e8e76.tar.bz2 |
Ninja Multi-Config: Fix issue with framework dependencies and Autogen
Fixes: #20345
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
-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 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) |