Commit 1380e611 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'nmc-cache-targets'

ccbedb80 Ninja Multi-Config: Restore rebuild_cache and edit_cache targets
6fdbe920

 cmNinjaUtilityTargetGenerator: Remove leftover development comment
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !5740
parents bd29de1a ccbedb80
......@@ -35,6 +35,11 @@ cmNinjaUtilityTargetGenerator::~cmNinjaUtilityTargetGenerator() = default;
void cmNinjaUtilityTargetGenerator::Generate(const std::string& config)
{
if (!this->GetGeneratorTarget()->Target->IsPerConfig()) {
this->WriteUtilBuildStatements(config, config);
return;
}
for (auto const& fileConfig : this->GetConfigNames()) {
if (!this->GetGlobalGenerator()
->GetCrossConfigs(fileConfig)
......@@ -122,8 +127,6 @@ void cmNinjaUtilityTargetGenerator::WriteUtilBuildStatements(
std::copy(util_outputs.begin(), util_outputs.end(),
std::back_inserter(gg->GetByproductsForCleanTarget()));
}
// TODO: Does this need an output config?
// Does this need to go in impl-<config>.ninja?
lg->AppendTargetDepends(genTarget, deps, config, fileConfig,
DependOnTargetArtifact);
......
......@@ -85,6 +85,9 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo\\;Debug\\;
run_cmake_configure(Simple)
unset(RunCMake_TEST_OPTIONS)
include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
run_ninja(Simple targets-default build.ninja -t targets)
run_ninja(Simple targets-debug build-Debug.ninja -t targets)
run_ninja(Simple targets-release build-Debug.ninja -t targets)
run_cmake_build(Simple debug-target Debug simpleexe)
run_ninja(Simple debug-target build-Debug.ninja simplestatic)
get_filename_component(simpleshared_Release "${TARGET_FILE_simpleshared_Release}" NAME)
......
(rebuild_cache: phony.*
edit_cache: phony|edit_cache: phony.*
rebuild_cache: phony)
(rebuild_cache: phony.*
edit_cache: phony|edit_cache: phony.*
rebuild_cache: phony)
(rebuild_cache: phony.*
edit_cache: phony|edit_cache: phony.*
rebuild_cache: phony)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment