diff options
author | Brad King <brad.king@kitware.com> | 2020-01-13 15:34:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-13 15:34:18 (GMT) |
commit | 041e58d195587ddc9aa6d87148ea9c3ab63310d1 (patch) | |
tree | 47b02da5df58b99df0e49872ccce4c1252b84774 | |
parent | 320ad3f31f7184e82e6fe38afa69d0066d796788 (diff) | |
parent | e8032e202e23436cc4301b7ded23c3fdce1161b2 (diff) | |
download | CMake-041e58d195587ddc9aa6d87148ea9c3ab63310d1.zip CMake-041e58d195587ddc9aa6d87148ea9c3ab63310d1.tar.gz CMake-041e58d195587ddc9aa6d87148ea9c3ab63310d1.tar.bz2 |
Merge topic 'ninja-cross-build-disable'
e8032e202e Ninja Multi-Config: Make cross-config building opt-in
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4205
22 files changed, 148 insertions, 12 deletions
diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst index 71cc392..92ca760 100644 --- a/Help/generator/Ninja Multi-Config.rst +++ b/Help/generator/Ninja Multi-Config.rst @@ -19,9 +19,10 @@ the desired ``build-<Config>.ninja`` file with ``ninja -f``. Running ``build-<Config>.ninja`` as the ``-f`` file and ``<target>`` as the build target. -Executables and libraries of any configuration can be built regardless of which +If :variable:`CMAKE_NINJA_CROSS_CONFIG_ENABLE` is turned on, executables and +libraries of any configuration can be built regardless of which ``build-<Config>.ninja`` file is used, simply by specifying -``<target>:<Config>`` as the Ninja target. You can also specify +``<target>:<OtherConfig>`` as the Ninja target. You can also specify ``<target>:all`` to build a target in all configurations. Each ``build-<Config>.ninja`` file will additionally have ``<target>`` targets which are aliases for ``<target>:<Config>``. However, custom commands and custom @@ -30,6 +31,11 @@ targets will always use the configuration specified in Ninja for the same file to be output with different commands in the same build graph. +If :variable:`CMAKE_NINJA_CROSS_CONFIG_ENABLE` is not enabled, you can still +build any target in ``build-<Config>.ninja`` by specifying +``<target>:<Config>`` or ``<target>``, but not ``<target>:<OtherConfig>`` or +``<target>:all``. + Consider the following example: .. code-block:: cmake @@ -54,7 +60,8 @@ This would build the ``Debug`` configuration of ``generator``, which would be used to generate ``generated.c``, which would be used to build the ``Debug`` configuration of ``generated``. -But if you run the following instead: +But if :variable:`CMAKE_NINJA_CROSS_CONFIG_ENABLE` is enabled, and you run the +following instead: .. code-block:: shell diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 74dd1fb..26f1d80 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -423,6 +423,7 @@ Variables that Control the Build /variable/CMAKE_MODULE_LINKER_FLAGS_INIT /variable/CMAKE_MSVCIDE_RUN_PATH /variable/CMAKE_MSVC_RUNTIME_LIBRARY + /variable/CMAKE_NINJA_CROSS_CONFIG_ENABLE /variable/CMAKE_NINJA_OUTPUT_PATH_PREFIX /variable/CMAKE_NO_BUILTIN_CHRPATH /variable/CMAKE_NO_SYSTEM_FROM_IMPORTED diff --git a/Help/variable/CMAKE_NINJA_CROSS_CONFIG_ENABLE.rst b/Help/variable/CMAKE_NINJA_CROSS_CONFIG_ENABLE.rst new file mode 100644 index 0000000..5c9c1aa --- /dev/null +++ b/Help/variable/CMAKE_NINJA_CROSS_CONFIG_ENABLE.rst @@ -0,0 +1,6 @@ +CMAKE_NINJA_CROSS_CONFIG_ENABLE +------------------------------- + +If this variable is enabled, cross-configuration building is enabled in the +:generator:`Ninja Multi-Config` generator. See the generator's description for +more details. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 35b4f91..ea66e3d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1274,7 +1274,7 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) } // Add target for all configs - if (this->IsMultiConfig()) { + if (this->EnableCrossConfigBuild()) { build.ExplicitDeps.clear(); for (auto const& config : configs) { build.ExplicitDeps.push_back(this->BuildAlias( @@ -1710,6 +1710,9 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) config)); } for (auto const& fileConfig : configs) { + if (fileConfig != config && !this->EnableCrossConfigBuild()) { + continue; + } if (this->IsMultiConfig()) { build.Variables["FILE_ARG"] = cmStrCat( "-f ", cmGlobalNinjaMultiGenerator::GetNinjaFilename(fileConfig)); @@ -1718,7 +1721,7 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) } } - if (this->IsMultiConfig()) { + if (this->EnableCrossConfigBuild()) { build.Outputs.front() = this->BuildAlias( this->NinjaOutputPath(this->GetCleanTargetName()), "all"); build.ExplicitDeps.clear(); @@ -2192,6 +2195,12 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( return true; } +bool cmGlobalNinjaGenerator::EnableCrossConfigBuild() const +{ + return this->IsMultiConfig() && + this->Makefiles.front()->IsOn("CMAKE_NINJA_CROSS_CONFIG_ENABLE"); +} + int cmcmd_cmake_ninja_dyndep(std::vector<std::string>::const_iterator argBeg, std::vector<std::string>::const_iterator argEnd) { diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index fdd9dda..3545f1e 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -395,6 +395,8 @@ public: return this->Configs[config].ByproductsForCleanTarget; } + bool EnableCrossConfigBuild() const; + protected: void Generate() override; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 360ef3c..517241e 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -72,6 +72,10 @@ void cmNinjaNormalTargetGenerator::Generate(const std::string& config) // Write the build statements bool firstForConfig = true; for (auto const& fileConfig : this->GetConfigNames()) { + if (fileConfig != config && + !this->GetGlobalGenerator()->EnableCrossConfigBuild()) { + continue; + } this->WriteObjectBuildStatements(config, fileConfig, firstForConfig); firstForConfig = false; } @@ -84,12 +88,18 @@ void cmNinjaNormalTargetGenerator::Generate(const std::string& config) this->WriteDeviceLinkStatement(config); firstForConfig = true; for (auto const& fileConfig : this->GetConfigNames()) { + if (fileConfig != config && + !this->GetGlobalGenerator()->EnableCrossConfigBuild()) { + continue; + } this->WriteLinkStatement(config, fileConfig, firstForConfig); firstForConfig = false; } } - this->GetGlobalGenerator()->AddTargetAlias( - this->GetTargetName(), this->GetGeneratorTarget(), "all"); + if (this->GetGlobalGenerator()->EnableCrossConfigBuild()) { + this->GetGlobalGenerator()->AddTargetAlias( + this->GetTargetName(), this->GetGeneratorTarget(), "all"); + } // Find ADDITIONAL_CLEAN_FILES this->AdditionalCleanFiles(config); diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index 4b51ddb..1271999 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -76,8 +76,9 @@ endfunction() set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Simple-build) -set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_MULTI_DEFAULT_BUILD_TYPE=RelWithDebInfo") +set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_MULTI_DEFAULT_BUILD_TYPE=RelWithDebInfo;-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(Simple) +unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(Simple debug-target Debug simpleexe) run_ninja(Simple debug-target build-Debug.ninja simplestatic) @@ -103,8 +104,22 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) file(TOUCH "${RunCMake_TEST_BINARY_DIR}/empty.cmake") run_ninja(Simple reconfigure-noconfig build.ninja simpleexe) +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SimpleNoCross-build) +run_cmake_configure(SimpleNoCross) +include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) +run_cmake_build(SimpleNoCross debug-target Debug simpleexe) +run_ninja(SimpleNoCross debug-target build-Debug.ninja simplestatic:Debug) +run_ninja(SimpleNoCross relwithdebinfo-in-release-graph-target build-Release.ninja simplestatic:RelWithDebInfo) +run_cmake_build(SimpleNoCross relwithdebinfo-in-release-graph-all Release all:RelWithDebInfo) +run_cmake_build(SimpleNoCross relwithdebinfo-in-release-graph-clean Release clean:RelWithDebInfo) +run_ninja(SimpleNoCross all-target build-Debug.ninja simplestatic:all) +run_ninja(SimpleNoCross all-all build-Debug.ninja all:all) +run_cmake_build(SimpleNoCross all-clean Debug clean:all) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandGenerator-build) +set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(CustomCommandGenerator) +unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(CustomCommandGenerator debug Debug generated) run_cmake_command(CustomCommandGenerator-debug-generated "${TARGET_FILE_generated_Debug}") @@ -119,7 +134,9 @@ run_ninja(CustomCommandGenerator release-in-debug-graph build-Debug.ninja genera run_cmake_command(CustomCommandGenerator-release-in-debug-graph-generated "${TARGET_FILE_generated_Release}") set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandsAndTargets-build) +set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(CustomCommandsAndTargets) +unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(CustomCommandsAndTargets release-command Release SubdirCommand) #FIXME Get this working @@ -133,9 +150,9 @@ run_cmake_build(CustomCommandsAndTargets debug-targetpostbuild Debug TopTargetPo run_ninja(CustomCommandsAndTargets release-targetpostbuild build-Release.ninja SubdirTargetPostBuild) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PostfixAndLocation-build) -set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release") +set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release;-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(PostfixAndLocation) -set(RunCMake_TEST_OPTIONS) +unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(PostfixAndLocation release-in-release-graph Release mylib:Release) run_cmake_build(PostfixAndLocation debug-in-release-graph Release mylib:Debug) @@ -148,14 +165,16 @@ run_ninja(Clean release-notall build-Release.ninja exenotall) run_cmake_build(Clean release-clean Release clean) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AdditionalCleanFiles-build) +set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(AdditionalCleanFiles) +unset(RunCMake_TEST_OPTIONS) run_cmake_build(AdditionalCleanFiles release-clean Release clean) run_ninja(AdditionalCleanFiles all-clean build-Debug.ninja clean:all) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Install-build) -set(RunCMake_TEST_OPTIONS -DCMAKE_INSTALL_PREFIX=${RunCMake_TEST_BINARY_DIR}/install) +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_TEST_BINARY_DIR}/install;-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(Install) -set(RunCMake_TEST_OPTIONS) +unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(Install release-install Release install) run_ninja(Install debug-in-release-graph-install build-Release.ninja install:Debug) @@ -167,7 +186,9 @@ run_ninja(Install debug-in-release-graph-install build-Release.ninja install:Deb if(CMake_TEST_Qt5) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Qt5-build) + set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(Qt5) + unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(Qt5 debug-in-release-graph Release exe:Debug) endif() diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-all-ninja-result.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-all-ninja-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-all-ninja-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-all-ninja-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-all-ninja-stderr.txt new file mode 100644 index 0000000..905a355 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-all-ninja-stderr.txt @@ -0,0 +1 @@ +^ninja: error: unknown target 'all:all'$ diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-clean-build-result.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-clean-build-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-clean-build-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-clean-build-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-clean-build-stderr.txt new file mode 100644 index 0000000..43528de --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-clean-build-stderr.txt @@ -0,0 +1 @@ +^ninja: error: unknown target 'clean:all'$ diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-result.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt new file mode 100644 index 0000000..6db4bcc --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt @@ -0,0 +1 @@ +^ninja: error: unknown target 'simplestatic:all'$ diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-debug-target-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-debug-target-build-check.cmake new file mode 100644 index 0000000..6bb7773 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-debug-target-build-check.cmake @@ -0,0 +1,31 @@ +check_files("${RunCMake_TEST_BINARY_DIR}" + INCLUDE + ${GENERATED_FILES} + + ${TARGET_FILE_simpleexe_Debug} + ${TARGET_OBJECT_FILES_simpleexe_Debug} + + ${TARGET_FILE_simpleshared_Debug} + ${TARGET_LINKER_FILE_simpleshared_Debug} + ${TARGET_OBJECT_FILES_simpleshared_Debug} + + ${TARGET_OBJECT_FILES_simpleobj_Debug} + + EXCLUDE + ${TARGET_OBJECT_FILES_simplestatic_Debug} + + ${TARGET_OBJECT_FILES_simpleexe_Release} + ${TARGET_OBJECT_FILES_simpleshared_Release} + ${TARGET_OBJECT_FILES_simplestatic_Release} + ${TARGET_OBJECT_FILES_simpleobj_Release} + + ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel} + ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel} + ${TARGET_OBJECT_FILES_simplestatic_MinSizeRel} + ${TARGET_OBJECT_FILES_simpleobj_MinSizeRel} + + ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo} + ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo} + ${TARGET_OBJECT_FILES_simplestatic_RelWithDebInfo} + ${TARGET_OBJECT_FILES_simpleobj_RelWithDebInfo} + ) diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-debug-target-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-debug-target-ninja-check.cmake new file mode 100644 index 0000000..c8a735a --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-debug-target-ninja-check.cmake @@ -0,0 +1,32 @@ +check_files("${RunCMake_TEST_BINARY_DIR}" + INCLUDE + ${GENERATED_FILES} + + ${TARGET_FILE_simpleexe_Debug} + ${TARGET_OBJECT_FILES_simpleexe_Debug} + + ${TARGET_FILE_simpleshared_Debug} + ${TARGET_LINKER_FILE_simpleshared_Debug} + ${TARGET_OBJECT_FILES_simpleshared_Debug} + + ${TARGET_FILE_simplestatic_Debug} + ${TARGET_OBJECT_FILES_simplestatic_Debug} + + ${TARGET_OBJECT_FILES_simpleobj_Debug} + + EXCLUDE + ${TARGET_OBJECT_FILES_simpleexe_Release} + ${TARGET_OBJECT_FILES_simpleshared_Release} + ${TARGET_OBJECT_FILES_simplestatic_Release} + ${TARGET_OBJECT_FILES_simpleobj_Release} + + ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel} + ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel} + ${TARGET_OBJECT_FILES_simplestatic_MinSizeRel} + ${TARGET_OBJECT_FILES_simpleobj_MinSizeRel} + + ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo} + ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo} + ${TARGET_OBJECT_FILES_simplestatic_RelWithDebInfo} + ${TARGET_OBJECT_FILES_simpleobj_RelWithDebInfo} + ) diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-all-build-result.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-all-build-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-all-build-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-all-build-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-all-build-stderr.txt new file mode 100644 index 0000000..95f42be --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-all-build-stderr.txt @@ -0,0 +1,3 @@ +^ninja: error: 'RelWithDebInfo/[^ +]*simplestatic[^ +]*', needed by 'all:RelWithDebInfo', missing and no known rule to make it$ diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-clean-build-result.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-clean-build-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-clean-build-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-clean-build-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-clean-build-stderr.txt new file mode 100644 index 0000000..70eef2f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-clean-build-stderr.txt @@ -0,0 +1 @@ +^ninja: error: unknown target 'clean:RelWithDebInfo'$ diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-target-ninja-result.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-target-ninja-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-target-ninja-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-target-ninja-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-target-ninja-stderr.txt new file mode 100644 index 0000000..74191bb --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-relwithdebinfo-in-release-graph-target-ninja-stderr.txt @@ -0,0 +1,3 @@ +^ninja: error: 'RelWithDebInfo/[^ +]*simplestatic[^ +]*', needed by 'simplestatic:RelWithDebInfo', missing and no known rule to make it$ diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross.cmake new file mode 100644 index 0000000..2a5b708 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/Simple.cmake") |