From 0429a37e482219480ce7426b035d3abd822d99d3 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 18 Feb 2023 21:57:39 +0100 Subject: Kate: enable the ninja multiconfig generator for kate Kate can work as well with the multi-config version of ninja. Additionally, add the "/fast" targets only for make, not for ninja. --- Source/cmExtraKateGenerator.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index a128a8b..2707e09 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -35,6 +35,7 @@ cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory() // factory.AddSupportedGlobalGenerator("MSYS Makefiles"); #endif factory.AddSupportedGlobalGenerator("Ninja"); + factory.AddSupportedGlobalGenerator("Ninja Multi-Config"); factory.AddSupportedGlobalGenerator("Unix Makefiles"); } @@ -48,7 +49,9 @@ void cmExtraKateGenerator::Generate() this->ProjectName = this->GenerateProjectName( lg->GetProjectName(), mf->GetSafeDefinition("CMAKE_BUILD_TYPE"), this->GetPathBasename(lg->GetBinaryDirectory())); - this->UseNinja = (this->GlobalGenerator->GetName() == "Ninja"); + this->UseNinja = + ((this->GlobalGenerator->GetName() == "Ninja") || + (this->GlobalGenerator->GetName() == "Ninja Multi-Config")); this->CreateKateProjectFile(*lg); this->CreateDummyKateProjectFile(*lg); @@ -164,9 +167,11 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator& lg, case cmStateEnums::OBJECT_LIBRARY: { this->AppendTarget(fout, targetName, make, makeArgs, currentDir, homeOutputDir); - std::string fastTarget = cmStrCat(targetName, "/fast"); - this->AppendTarget(fout, fastTarget, make, makeArgs, currentDir, - homeOutputDir); + if (!this->UseNinja) { + std::string fastTarget = cmStrCat(targetName, "/fast"); + this->AppendTarget(fout, fastTarget, make, makeArgs, currentDir, + homeOutputDir); + } } break; default: -- cgit v0.12