diff options
author | Brad King <brad.king@kitware.com> | 2021-01-25 20:12:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-25 20:22:53 (GMT) |
commit | ccbedb80e42e799209f2536ec2fdbecf1b108483 (patch) | |
tree | 6f580e911f24facd9eb678b9a8913874e05969cb /Source/cmNinjaUtilityTargetGenerator.cxx | |
parent | 6fdbe9201ffa17af0d75db5f6ba33854044a56ee (diff) | |
download | CMake-ccbedb80e42e799209f2536ec2fdbecf1b108483.zip CMake-ccbedb80e42e799209f2536ec2fdbecf1b108483.tar.gz CMake-ccbedb80e42e799209f2536ec2fdbecf1b108483.tar.bz2 |
Ninja Multi-Config: Restore rebuild_cache and edit_cache targets
Since commit dcf9f4d2f7 (Ninja Multi-Config: Add support for
cross-config custom commands, 2020-12-09) we were not generating these
targets. Restore them and add a test.
Fixes: #21722
Diffstat (limited to 'Source/cmNinjaUtilityTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaUtilityTargetGenerator.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index e3a9c02..a18ca20 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -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) |