From 2f2e88900e922a225264125cbb9d08a002526121 Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:24:37 -0400 Subject: GHS: Fix gbuild job control gbuild command line is "-parallel[=n]". Fixes: #23252 --- Source/cmGlobalGhsMultiGenerator.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 5e51dd2..836efb2 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -523,9 +523,10 @@ cmGlobalGhsMultiGenerator::GenerateBuildCommand( makeCommand.Add(this->SelectMakeProgram(makeProgram, gbuild)); if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) { - makeCommand.Add("-parallel"); - if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) { - makeCommand.Add(std::to_string(jobs)); + if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) { + makeCommand.Add("-parallel"); + } else { + makeCommand.Add(std::string("-parallel=") + std::to_string(jobs)); } } -- cgit v0.12 From ad426aa697cd5737ca58b95f2acb9a55735d126b Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:24:46 -0400 Subject: GHS: Create RERUN_CMAKE Custom Target Create a Custom Target that will re-run CMake on user demand if any of the CMake input files have changed. --- Source/cmGlobalGhsMultiGenerator.cxx | 111 +++++++++++++++++++++++++++++++++++ Source/cmGlobalGhsMultiGenerator.h | 5 +- 2 files changed, 115 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 836efb2..4371d71 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -9,6 +9,7 @@ #include #include #include +#include #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" @@ -18,6 +19,7 @@ #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmMessageType.h" +#include "cmSourceFile.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" @@ -32,6 +34,8 @@ const char* cmGlobalGhsMultiGenerator::DEFAULT_BUILD_PROGRAM = "gbuild"; #elif defined(_WIN32) const char* cmGlobalGhsMultiGenerator::DEFAULT_BUILD_PROGRAM = "gbuild.exe"; #endif +const char* cmGlobalGhsMultiGenerator::CHECK_BUILD_SYSTEM_TARGET = + "RERUN_CMAKE"; cmGlobalGhsMultiGenerator::cmGlobalGhsMultiGenerator(cmake* cm) : cmGlobalGenerator(cm) @@ -476,6 +480,13 @@ void cmGlobalGhsMultiGenerator::Generate() this->WriteFileHeader(ftarget); this->WriteCustomTargetBOD(ftarget); ftarget.Close(); + + // create the stamp file when running CMake + if (!this->StampFile.empty()) { + cmGeneratedFileStream fstamp(this->StampFile); + fstamp.SetCopyIfDifferent(false); + fstamp.Close(); + } } void cmGlobalGhsMultiGenerator::OutputTopLevelProject( @@ -682,3 +693,103 @@ bool cmGlobalGhsMultiGenerator::VisitTarget( /* already complete */ return false; } + +bool cmGlobalGhsMultiGenerator::AddCheckTarget() +{ + // Skip the target if no regeneration is to be done. + if (this->GlobalSettingIsOn("CMAKE_SUPPRESS_REGENERATION")) { + return false; + } + + // Get the generators. + std::vector> const& generators = + this->LocalGenerators; + auto& lg = + cm::static_reference_cast(generators[0]); + + // The name of the output file for the custom command. + this->StampFile = lg.GetBinaryDirectory() + std::string("/CMakeFiles/") + + CHECK_BUILD_SYSTEM_TARGET; + + // Add a custom rule to re-run CMake if any input files changed. + { + // Collect the input files used to generate all targets in this + // project. + std::vector listFiles; + for (const auto& gen : generators) { + cm::append(listFiles, gen->GetMakefile()->GetListFiles()); + } + + // Add the cache file. + listFiles.push_back(cmStrCat( + this->GetCMakeInstance()->GetHomeOutputDirectory(), "/CMakeCache.txt")); + + // Print not implemented warning. + if (this->GetCMakeInstance()->DoWriteGlobVerifyTarget()) { + std::ostringstream msg; + msg << "Any pre-check scripts, such as those generated for file(GLOB " + "CONFIGURE_DEPENDS), will not be run by gbuild."; + this->GetCMakeInstance()->IssueMessage(MessageType::AUTHOR_WARNING, + msg.str()); + } + + // Sort the list of input files and remove duplicates. + std::sort(listFiles.begin(), listFiles.end(), std::less()); + auto newEnd = std::unique(listFiles.begin(), listFiles.end()); + listFiles.erase(newEnd, listFiles.end()); + + // Create a rule to re-run CMake and create output file. + std::string argS = cmStrCat("-S", lg.GetSourceDirectory()); + std::string argB = cmStrCat("-B", lg.GetBinaryDirectory()); + cmCustomCommandLines commandLines = cmMakeSingleCommandLine( + { cmSystemTools::GetCMakeCommand(), argS, argB }); + + /* Create the target(Exclude from ALL_BUILD). + * + * The build tool, currently, does not support rereading the project files + * if they get updated. So do not run this target as part of ALL_BUILD. + */ + auto cc = cm::make_unique(); + cmTarget* tgt = + lg.AddUtilityCommand(CHECK_BUILD_SYSTEM_TARGET, true, std::move(cc)); + auto ptr = cm::make_unique(tgt, &lg); + auto* gt = ptr.get(); + lg.AddGeneratorTarget(std::move(ptr)); + + // Add the rule. + cc = cm::make_unique(); + cc->SetOutputs(this->StampFile); + cc->SetDepends(listFiles); + cc->SetCommandLines(commandLines); + cc->SetComment("Checking Build System"); + cc->SetCMP0116Status(cmPolicies::NEW); + cc->SetEscapeOldStyle(false); + cc->SetStdPipesUTF8(true); + + if (cmSourceFile* file = + lg.AddCustomCommandToOutput(std::move(cc), true)) { + gt->AddSource(file->ResolveFullPath()); + } else { + cmSystemTools::Error("Error adding rule for " + this->StampFile); + } + // Organize in the "predefined targets" folder: + if (this->UseFolderProperty()) { + tgt->SetProperty("FOLDER", this->GetPredefinedTargetsFolder()); + } + } + + return true; +} + +void cmGlobalGhsMultiGenerator::AddExtraIDETargets() +{ + // ToDo: Add ALL_BUILD project target? Yes, need to replace current method + + /* Add Custom Target to check if CMake needs to be rerun. + * + * The build tool, currently, does not support rereading the project files + * if they get updated. So do not make the other targets dependent on this + * check. + */ + this->AddCheckTarget(); +} diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index 26ea3c7..7343e55 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -92,6 +92,7 @@ protected: const cmBuildOptions& buildOptions = cmBuildOptions(), std::vector const& makeOptions = std::vector()) override; + void AddExtraIDETargets() override; private: void GetToolset(cmMakefile* mf, std::string& tsd, const std::string& ts); @@ -111,10 +112,12 @@ private: void WriteAllTarget(cmLocalGenerator* root, std::vector& generators, std::string& all_target); - + bool AddCheckTarget(); + std::string StampFile; static std::string TrimQuotes(std::string str); static const char* DEFAULT_BUILD_PROGRAM; + static const char* CHECK_BUILD_SYSTEM_TARGET; bool ComputeTargetBuildOrder(cmGeneratorTarget const* tgt, std::vector& build); -- cgit v0.12 From edff0f6a1d7174c15451aeab31d51c03382e624d Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:24:51 -0400 Subject: GHS: Use Custom Target for ALL_BUILD Use a Custom Target for ALL_BUILD instead of special code. This also changes the name from .ALL_BUILD.tgt to ALL_BUILD.tgt. The name change is part of standardizing the CMakePredefinedTargets names. --- Source/cmGlobalGhsMultiGenerator.cxx | 149 +++++++++++++++++------------------ Source/cmGlobalGhsMultiGenerator.h | 9 +-- 2 files changed, 76 insertions(+), 82 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 4371d71..ca05076 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalGhsMultiGenerator.h" +#include +#include #include -#include +#include #include #include @@ -11,6 +13,8 @@ #include #include +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" @@ -19,11 +23,13 @@ #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmMessageType.h" +#include "cmPolicies.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmValue.h" #include "cmVersion.h" #include "cmake.h" @@ -283,7 +289,7 @@ void cmGlobalGhsMultiGenerator::WriteTopLevelProject(std::ostream& fout, { this->WriteFileHeader(fout); this->WriteMacros(fout, root); - this->WriteHighLevelDirectives(root, fout); + this->WriteHighLevelDirectives(fout, root); GhsMultiGpj::WriteGpjTag(GhsMultiGpj::PROJECT, fout); fout << "# Top Level Project File\n"; @@ -311,10 +317,8 @@ void cmGlobalGhsMultiGenerator::WriteTopLevelProject(std::ostream& fout, } } -void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout, - std::string& all_target) +void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout) { - fout << "CMakeFiles/" << all_target << " [Project]\n"; // All known targets for (cmGeneratorTarget const* target : this->ProjectTargets) { if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY || @@ -335,6 +339,9 @@ void cmGlobalGhsMultiGenerator::WriteProjectLine( { cmValue projName = target->GetProperty("GENERATOR_FILE_NAME"); cmValue projType = target->GetProperty("GENERATOR_FILE_NAME_EXT"); + /* If either value is not valid then this particular target is an + * unsupported target type and should be skipped. + */ if (projName && projType) { cmLocalGenerator* lg = target->GetLocalGenerator(); std::string dir = lg->GetCurrentBinaryDirectory(); @@ -350,12 +357,6 @@ void cmGlobalGhsMultiGenerator::WriteProjectLine( std::string projFile = dir + *projName + FILE_EXTENSION; fout << projFile; fout << ' ' << *projType << '\n'; - } else { - /* Should never happen */ - std::string message = - "The project file for target [" + target->GetName() + "] is missing.\n"; - cmSystemTools::Error(message); - fout << "{comment} " << target->GetName() << " [missing project file]\n"; } } @@ -395,62 +396,6 @@ void cmGlobalGhsMultiGenerator::WriteTargets(cmLocalGenerator* root) } } -void cmGlobalGhsMultiGenerator::WriteAllTarget( - cmLocalGenerator* root, std::vector& generators, - std::string& all_target) -{ - this->ProjectTargets.clear(); - - // create target build file - all_target = root->GetProjectName() + "." + this->GetAllTargetName() + - ".tgt" + FILE_EXTENSION; - std::string fname = - root->GetCurrentBinaryDirectory() + "/CMakeFiles/" + all_target; - cmGeneratedFileStream fbld(fname); - fbld.SetCopyIfDifferent(true); - this->WriteFileHeader(fbld); - GhsMultiGpj::WriteGpjTag(GhsMultiGpj::PROJECT, fbld); - - // Collect all targets under this root generator and the transitive - // closure of their dependencies. - TargetDependSet projectTargets; - TargetDependSet originalTargets; - this->GetTargetSets(projectTargets, originalTargets, root, generators); - OrderedTargetDependSet sortedProjectTargets(projectTargets, ""); - std::vector defaultTargets; - for (cmGeneratorTarget const* t : sortedProjectTargets) { - /* save list of all targets in sorted order */ - this->ProjectTargets.push_back(t); - } - for (cmGeneratorTarget const* t : sortedProjectTargets) { - if (!t->IsInBuildSystem()) { - continue; - } - if (!this->IsExcluded(t->GetLocalGenerator(), t)) { - defaultTargets.push_back(t); - } - } - std::vector build; - if (this->ComputeTargetBuildOrder(defaultTargets, build)) { - std::string message = "The inter-target dependency graph for project [" + - root->GetProjectName() + "] had a cycle.\n"; - cmSystemTools::Error(message); - } else { - // determine the targets for ALL target - std::string rootBinaryDir = - cmStrCat(root->GetCurrentBinaryDirectory(), "/CMakeFiles"); - for (cmGeneratorTarget const* target : build) { - if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY || - target->GetType() == cmStateEnums::MODULE_LIBRARY || - target->GetType() == cmStateEnums::SHARED_LIBRARY) { - continue; - } - this->WriteProjectLine(fbld, target, rootBinaryDir); - } - } - fbld.Close(); -} - void cmGlobalGhsMultiGenerator::Generate() { std::string fname; @@ -493,12 +438,23 @@ void cmGlobalGhsMultiGenerator::OutputTopLevelProject( cmLocalGenerator* root, std::vector& generators) { std::string fname; - std::string all_target; if (generators.empty()) { return; } + // Collect all targets under this root generator and the transitive + // closure of their dependencies. + TargetDependSet projectTargets; + TargetDependSet originalTargets; + this->GetTargetSets(projectTargets, originalTargets, root, generators); + OrderedTargetDependSet sortedProjectTargets(projectTargets, ""); + this->ProjectTargets.clear(); + for (cmGeneratorTarget const* t : sortedProjectTargets) { + /* save list of all targets in sorted order */ + this->ProjectTargets.push_back(t); + } + /* Name top-level projects as filename.top.gpj to avoid name clashes * with target projects. This avoid the issue where the project has * the same name as the executable target. @@ -509,11 +465,8 @@ void cmGlobalGhsMultiGenerator::OutputTopLevelProject( cmGeneratedFileStream top(fname); top.SetCopyIfDifferent(true); this->WriteTopLevelProject(top, root); - - this->WriteAllTarget(root, generators, all_target); this->WriteTargets(root); - - this->WriteSubProjects(top, all_target); + this->WriteSubProjects(top); top.Close(); } @@ -569,9 +522,7 @@ cmGlobalGhsMultiGenerator::GenerateBuildCommand( } } else { /* transform name to default build */; - std::string all = proj; - all.replace(all.end() - 7, all.end(), - std::string(this->GetAllTargetName()) + ".tgt.gpj"); + std::string all = std::string(this->GetAllTargetName()) + ".tgt.gpj"; makeCommand.Add(all); } return { makeCommand }; @@ -591,7 +542,7 @@ void cmGlobalGhsMultiGenerator::WriteMacros(std::ostream& fout, } void cmGlobalGhsMultiGenerator::WriteHighLevelDirectives( - cmLocalGenerator* root, std::ostream& fout) + std::ostream& fout, cmLocalGenerator* root) { /* put primary target and customization files into project file */ cmValue const tgt = root->GetMakefile()->GetDefinition("GHS_PRIMARY_TARGET"); @@ -781,9 +732,53 @@ bool cmGlobalGhsMultiGenerator::AddCheckTarget() return true; } +void cmGlobalGhsMultiGenerator::AddAllTarget() +{ + // Add a special target that depends on ALL projects for easy build + // of one configuration only. + for (auto const& it : this->ProjectMap) { + std::vector const& gen = it.second; + // add the ALL_BUILD to the first local generator of each project + if (!gen.empty()) { + // Use no actual command lines so that the target itself is not + // considered always out of date. + auto cc = cm::make_unique(); + cc->SetCMP0116Status(cmPolicies::NEW); + cc->SetEscapeOldStyle(false); + cc->SetComment("Build all projects"); + cmTarget* allBuild = gen[0]->AddUtilityCommand(this->GetAllTargetName(), + true, std::move(cc)); + + gen[0]->AddGeneratorTarget( + cm::make_unique(allBuild, gen[0])); + + // Organize in the "predefined targets" folder: + if (this->UseFolderProperty()) { + allBuild->SetProperty("FOLDER", this->GetPredefinedTargetsFolder()); + } + + // Now make all targets depend on the ALL_BUILD target + for (cmLocalGenerator const* i : gen) { + for (const auto& tgt : i->GetGeneratorTargets()) { + // Skip global or imported targets + if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || + tgt->IsImported()) { + continue; + } + // Skip Exclude From All Targets + if (!this->IsExcluded(gen[0], tgt.get())) { + allBuild->AddUtility(tgt->GetName(), false); + } + } + } + } + } +} + void cmGlobalGhsMultiGenerator::AddExtraIDETargets() { - // ToDo: Add ALL_BUILD project target? Yes, need to replace current method + // Add a special target that depends on ALL projects. + this->AddAllTarget(); /* Add Custom Target to check if CMake needs to be rerun. * diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index 7343e55..12e9991 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -102,17 +102,16 @@ private: std::vector& generators); void WriteTopLevelProject(std::ostream& fout, cmLocalGenerator* root); void WriteMacros(std::ostream& fout, cmLocalGenerator* root); - void WriteHighLevelDirectives(cmLocalGenerator* root, std::ostream& fout); - void WriteSubProjects(std::ostream& fout, std::string& all_target); + void WriteHighLevelDirectives(std::ostream& fout, cmLocalGenerator* root); + void WriteSubProjects(std::ostream& fout); void WriteTargets(cmLocalGenerator* root); void WriteProjectLine(std::ostream& fout, cmGeneratorTarget const* target, std::string& rootBinaryDir); void WriteCustomRuleBOD(std::ostream& fout); void WriteCustomTargetBOD(std::ostream& fout); - void WriteAllTarget(cmLocalGenerator* root, - std::vector& generators, - std::string& all_target); bool AddCheckTarget(); + void AddAllTarget(); + std::string StampFile; static std::string TrimQuotes(std::string str); -- cgit v0.12 From 724b5491ef63adb9ce39958f06e0d7ff0d444832 Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:24:59 -0400 Subject: GHS: Rearrange project files in binary directory The top level project and the target projects are all in the same directory so they are easier to find and looks nicer in the GUI. All of the ancillary project files are located in the target subdirectory. --- Source/cmGhsMultiTargetGenerator.cxx | 36 ++++++++++++++++++++++-------------- Source/cmGlobalGhsMultiGenerator.cxx | 24 ++++++------------------ 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index a2d64aa..a7796c9 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -107,12 +107,6 @@ void cmGhsMultiTargetGenerator::Generate() return; } - // Tell the global generator the name of the project file - this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME", - this->Name); - this->GeneratorTarget->Target->SetProperty( - "GENERATOR_FILE_NAME_EXT", GhsMultiGpj::GetGpjTag(this->TagType)); - this->GenerateTarget(); } @@ -121,7 +115,14 @@ void cmGhsMultiTargetGenerator::GenerateTarget() // Open the target file in copy-if-different mode. std::string fproj = cmStrCat(this->LocalGenerator->GetCurrentBinaryDirectory(), '/', - this->Name, cmGlobalGhsMultiGenerator::FILE_EXTENSION); + this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget), + '/', this->Name, cmGlobalGhsMultiGenerator::FILE_EXTENSION); + + // Tell the global generator the name of the project file + this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME", fproj); + this->GeneratorTarget->Target->SetProperty( + "GENERATOR_FILE_NAME_EXT", GhsMultiGpj::GetGpjTag(this->TagType)); + cmGeneratedFileStream fout(fproj); fout.SetCopyIfDifferent(true); @@ -155,10 +156,16 @@ void cmGhsMultiTargetGenerator::WriteTargetSpecifics(std::ostream& fout, { std::string outpath; + /* Determine paths from the target project file to where the output artifacts + * need to be located. + */ if (this->TagType != GhsMultiGpj::SUBPROJECT) { // set target binary file destination - outpath = this->GeneratorTarget->GetDirectory(config); - outpath = this->LocalGenerator->MaybeRelativeToCurBinDir(outpath); + std::string binpath = cmStrCat( + this->LocalGenerator->GetCurrentBinaryDirectory(), '/', + this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget)); + outpath = cmSystemTools::RelativePath( + binpath, this->GeneratorTarget->GetDirectory(config)); /* clang-format off */ fout << " :binDirRelative=\"" << outpath << "\"\n" " -o \"" << this->TargetNameReal << "\"\n"; @@ -166,7 +173,7 @@ void cmGhsMultiTargetGenerator::WriteTargetSpecifics(std::ostream& fout, } // set target object file destination - outpath = this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget); + outpath = "."; fout << " :outputDirRelative=\"" << outpath << "\"\n"; } @@ -576,11 +583,12 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj) // Open the filestream in copy-if-different mode. std::string gname = sg; cmsys::SystemTools::ReplaceString(gname, "\\", "_"); - std::string lpath = cmStrCat( - this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget), '/', - gname, cmGlobalGhsMultiGenerator::FILE_EXTENSION); + std::string lpath = + cmStrCat(gname, cmGlobalGhsMultiGenerator::FILE_EXTENSION); std::string fpath = cmStrCat( - this->LocalGenerator->GetCurrentBinaryDirectory(), '/', lpath); + this->LocalGenerator->GetCurrentBinaryDirectory(), '/', + this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget), '/', + lpath); cmGeneratedFileStream* f = new cmGeneratedFileStream(fpath); f->SetCopyIfDifferent(true); gfiles.push_back(f); diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index ca05076..fee438d 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -328,8 +328,7 @@ void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout) target->GetName() != this->GetInstallTargetName())) { continue; } - fout << "CMakeFiles/" << target->GetName() + ".tgt" + FILE_EXTENSION - << " [Project]\n"; + fout << target->GetName() + ".tgt" + FILE_EXTENSION << " [Project]\n"; } } @@ -337,33 +336,22 @@ void cmGlobalGhsMultiGenerator::WriteProjectLine( std::ostream& fout, cmGeneratorTarget const* target, std::string& rootBinaryDir) { - cmValue projName = target->GetProperty("GENERATOR_FILE_NAME"); + cmValue projFile = target->GetProperty("GENERATOR_FILE_NAME"); cmValue projType = target->GetProperty("GENERATOR_FILE_NAME_EXT"); /* If either value is not valid then this particular target is an * unsupported target type and should be skipped. */ - if (projName && projType) { - cmLocalGenerator* lg = target->GetLocalGenerator(); - std::string dir = lg->GetCurrentBinaryDirectory(); - dir = cmSystemTools::ForceToRelativePath(rootBinaryDir, dir); - if (dir == ".") { - dir.clear(); - } else { - if (dir.back() != '/') { - dir += "/"; - } - } + if (projFile && projType) { + std::string path = cmSystemTools::RelativePath(rootBinaryDir, projFile); - std::string projFile = dir + *projName + FILE_EXTENSION; - fout << projFile; + fout << path; fout << ' ' << *projType << '\n'; } } void cmGlobalGhsMultiGenerator::WriteTargets(cmLocalGenerator* root) { - std::string rootBinaryDir = - cmStrCat(root->GetCurrentBinaryDirectory(), "/CMakeFiles"); + std::string rootBinaryDir = root->GetCurrentBinaryDirectory(); // All known targets for (cmGeneratorTarget const* target : this->ProjectTargets) { -- cgit v0.12 From a645287784876eb031c4254968ef2f07417323e6 Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:25:06 -0400 Subject: GHS: update build command * Remove unecessary logic for selecting gbuild -- CMake defaults to the Cache entry * Support building multiple targets * Fix error when ctest passes in a vector potentially containing an empty string. -- At minimum build the ALL_BUILD project, never just the Top Project. * Add verbose support * There can only be one top-level project per directory because the project() command can only be used once per directory. Multiple calls of project() only use the last invocation. --- Source/cmGlobalGhsMultiGenerator.cxx | 52 +++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index fee438d..1db4160 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -462,17 +462,13 @@ std::vector cmGlobalGhsMultiGenerator::GenerateBuildCommand( const std::string& makeProgram, const std::string& projectName, const std::string& projectDir, std::vector const& targetNames, - const std::string& /*config*/, int jobs, bool /*verbose*/, + const std::string& /*config*/, int jobs, bool verbose, const cmBuildOptions& /*buildOptions*/, std::vector const& makeOptions) { - GeneratedMakeCommand makeCommand = {}; - std::string gbuild; - if (cmValue gbuildCached = - this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM")) { - gbuild = *gbuildCached; - } - makeCommand.Add(this->SelectMakeProgram(makeProgram, gbuild)); + GeneratedMakeCommand makeCommand; + + makeCommand.Add(this->SelectMakeProgram(makeProgram)); if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) { if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) { @@ -482,38 +478,46 @@ cmGlobalGhsMultiGenerator::GenerateBuildCommand( } } - makeCommand.Add(makeOptions.begin(), makeOptions.end()); - - /* determine which top-project file to use */ + /* determine the top-project file in the project directory */ std::string proj = projectName + ".top" + FILE_EXTENSION; std::vector files; cmSystemTools::Glob(projectDir, ".*\\.top\\.gpj", files); if (!files.empty()) { - /* if multiple top-projects are found in build directory - * then prefer projectName top-project. - */ - if (!cm::contains(files, proj)) { - proj = files.at(0); - } + /* use the real top-level project in the directory */ + proj = files.at(0); } - makeCommand.Add("-top", proj); + + /* determine targets to build */ + bool build_all = false; if (!targetNames.empty()) { - if (cm::contains(targetNames, "clean")) { - makeCommand.Add("-clean"); - } else { - for (const auto& tname : targetNames) { - if (!tname.empty()) { + for (const auto& tname : targetNames) { + if (!tname.empty()) { + if (tname == "clean") { + makeCommand.Add("-clean"); + } else { makeCommand.Add(tname + ".tgt.gpj"); } + } else { + build_all = true; } } } else { + build_all = true; + } + + if (build_all) { /* transform name to default build */; std::string all = std::string(this->GetAllTargetName()) + ".tgt.gpj"; makeCommand.Add(all); } - return { makeCommand }; + + if (verbose) { + makeCommand.Add("-commands"); + } + makeCommand.Add(makeOptions.begin(), makeOptions.end()); + + return { std::move(makeCommand) }; } void cmGlobalGhsMultiGenerator::WriteMacros(std::ostream& fout, -- cgit v0.12 From b3e9c7290114df08f5fb2660ea13108bf5344a6d Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:25:13 -0400 Subject: GHS: use INSTALL target For consistancy use upper case install for pre-defined targets. --- Source/cmGlobalGhsMultiGenerator.h | 2 -- Tests/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index 12e9991..e8fe6f8 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -81,8 +81,6 @@ public: // Write the common disclaimer text at the top of each build file. void WriteFileHeader(std::ostream& fout); - const char* GetInstallTargetName() const override { return "install"; } - protected: void Generate() override; std::vector GenerateBuildCommand( diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9ac42a6..e39cdaf 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2319,7 +2319,7 @@ if(BUILD_TESTING) endmacro() macro(add_test_GhsMulti_rename_install test_name) add_test_GhsMulti( ${test_name} GhsMultiRenameInstall ${test_name} - "-DCMAKE_INSTALL_PREFIX=. -DRUN_TEST=${test_name}" ${CMAKE_CMAKE_COMMAND} --build . --target install) + "-DCMAKE_INSTALL_PREFIX=. -DRUN_TEST=${test_name}" ${CMAKE_CMAKE_COMMAND} --build . --target INSTALL) endmacro() #unset ghs config variables unset(ghs_config_name) -- cgit v0.12 From bdb213819c8e3b5191a7832c4b8fa1aca4b1335f Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:25:17 -0400 Subject: GHS: Do not include WindowsPaths This causes issues where CMAKE_SYSTEM_PREFIX_PATH contains incorrect paths. GHS is a cross-compiler toolchain and doesn't use anything in these locations. Also WindowsPaths are always wrong on Linux hosts. --- Modules/Platform/GHS-MULTI.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/Modules/Platform/GHS-MULTI.cmake b/Modules/Platform/GHS-MULTI.cmake index 60a15c4..5b28f29 100644 --- a/Modules/Platform/GHS-MULTI.cmake +++ b/Modules/Platform/GHS-MULTI.cmake @@ -13,5 +13,3 @@ set(GHSMULTI 1) set(CMAKE_FIND_LIBRARY_PREFIXES "") set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") - -include(Platform/WindowsPaths) -- cgit v0.12 From 93c1acd8ffdd59e127b11a47e13bf058d9cfe43c Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:25:21 -0400 Subject: GHS: List predefined targets before user targets in GUI --- Source/cmGlobalGhsMultiGenerator.cxx | 19 ++++++++++++++++--- Source/cmGlobalGhsMultiGenerator.h | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 1db4160..f405a04 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -317,8 +317,14 @@ void cmGlobalGhsMultiGenerator::WriteTopLevelProject(std::ostream& fout, } } -void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout) +void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout, + bool filterPredefined) { + std::set predefinedTargets; + predefinedTargets.insert(this->GetInstallTargetName()); + predefinedTargets.insert(this->GetAllTargetName()); + predefinedTargets.insert(std::string(CHECK_BUILD_SYSTEM_TARGET)); + // All known targets for (cmGeneratorTarget const* target : this->ProjectTargets) { if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY || @@ -328,7 +334,13 @@ void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout) target->GetName() != this->GetInstallTargetName())) { continue; } - fout << target->GetName() + ".tgt" + FILE_EXTENSION << " [Project]\n"; + /* Check if the current target is a predefined CMake target */ + bool predefinedTarget = + predefinedTargets.find(target->GetName()) != predefinedTargets.end(); + if ((filterPredefined && predefinedTarget) || + (!filterPredefined && !predefinedTarget)) { + fout << target->GetName() + ".tgt" + FILE_EXTENSION << " [Project]\n"; + } } } @@ -454,7 +466,8 @@ void cmGlobalGhsMultiGenerator::OutputTopLevelProject( top.SetCopyIfDifferent(true); this->WriteTopLevelProject(top, root); this->WriteTargets(root); - this->WriteSubProjects(top); + this->WriteSubProjects(top, true); + this->WriteSubProjects(top, false); top.Close(); } diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index e8fe6f8..aa68d3b 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -101,7 +101,7 @@ private: void WriteTopLevelProject(std::ostream& fout, cmLocalGenerator* root); void WriteMacros(std::ostream& fout, cmLocalGenerator* root); void WriteHighLevelDirectives(std::ostream& fout, cmLocalGenerator* root); - void WriteSubProjects(std::ostream& fout); + void WriteSubProjects(std::ostream& fout, bool filterPredefined); void WriteTargets(cmLocalGenerator* root); void WriteProjectLine(std::ostream& fout, cmGeneratorTarget const* target, std::string& rootBinaryDir); -- cgit v0.12 From 829e946c69aacecb9b56b9522bd357db316fea4a Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Wed, 16 Mar 2022 16:25:25 -0400 Subject: GHS: Update tests for updated binary layout The tests need to look for the items in the correct locations. --- .../GhsMultiCompilerOptions/CMakeLists.txt | 15 +-- Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt | 2 + Tests/GhsMulti/GhsMultiExclude/verify.cmake | 104 +++++++++++---------- Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt | 15 +-- .../GhsMulti/GhsMultiMultipleProjects/verify.cmake | 90 +++++++----------- 5 files changed, 104 insertions(+), 122 deletions(-) diff --git a/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt b/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt index 4a3f5c2..9250709 100644 --- a/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt +++ b/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt @@ -27,8 +27,7 @@ try_compile(RESULT message("Output from build:\n${OUTPUT}") if (RUN_TEST STREQUAL "RELEASE_FLAGS") find_file (fileName test_none.gpj - ${CMAKE_CURRENT_BINARY_DIR}/build - ${CMAKE_CURRENT_BINARY_DIR}/build/test_none + ${CMAKE_CURRENT_BINARY_DIR}/build/test_none.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -40,8 +39,7 @@ if (RUN_TEST STREQUAL "RELEASE_FLAGS") else() unset(fileName CACHE) find_file (fileName K1.gpj - ${CMAKE_CURRENT_BINARY_DIR}/build - ${CMAKE_CURRENT_BINARY_DIR}/build/K1 + ${CMAKE_CURRENT_BINARY_DIR}/build/K1.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -53,8 +51,7 @@ else() unset(fileName CACHE) find_file (fileName K2.gpj - ${CMAKE_CURRENT_BINARY_DIR}/build - ${CMAKE_CURRENT_BINARY_DIR}/build/K2 + ${CMAKE_CURRENT_BINARY_DIR}/build/K2.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -66,8 +63,7 @@ else() unset(fileName CACHE) find_file (fileName K3.gpj - ${CMAKE_CURRENT_BINARY_DIR}/build - ${CMAKE_CURRENT_BINARY_DIR}/build/K3 + ${CMAKE_CURRENT_BINARY_DIR}/build/K3.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -79,8 +75,7 @@ else() unset(fileName CACHE) find_file (fileName K4.gpj - ${CMAKE_CURRENT_BINARY_DIR}/build - ${CMAKE_CURRENT_BINARY_DIR}/build/K4 + ${CMAKE_CURRENT_BINARY_DIR}/build/K4.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) diff --git a/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt b/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt index 0448cf2..575bf50 100644 --- a/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt +++ b/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt @@ -14,4 +14,6 @@ set_target_properties( lib1 PROPERTIES EXCLUDE_FROM_ALL yes ) add_library(lib2 EXCLUDE_FROM_ALL lib1.c) +add_library(lib3 lib1.c) + add_executable(exe1 exe1.c) diff --git a/Tests/GhsMulti/GhsMultiExclude/verify.cmake b/Tests/GhsMulti/GhsMultiExclude/verify.cmake index 0467b5a..99cef63 100644 --- a/Tests/GhsMulti/GhsMultiExclude/verify.cmake +++ b/Tests/GhsMulti/GhsMultiExclude/verify.cmake @@ -1,54 +1,56 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#test project was generated -unset(fileName CACHE) -find_file (fileName lib1.gpj - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/lib1 - ) - -if (fileName) - message("Found target lib1: ${fileName}") -else() - message(SEND_ERROR "Could not find target lib1: ${fileName}") -endif() - -#test project was built -unset(fileName CACHE) -find_file (fileName lib1.a - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/lib1 - ) - -if (fileName) - message(SEND_ERROR "Found target lib1: ${fileName}") -else() - message("Could not find target lib1: ${fileName}") -endif() - -#test project was generated -unset(fileName CACHE) -find_file (fileName lib2.gpj - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/lib2 - ) - -if (fileName) - message("Found target lib2 ${fileName}") -else() - message(SEND_ERROR "Could not find target lib2: ${fileName}") -endif() - -#test project was built -unset(fileName CACHE) -find_file (fileName lib2.a - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/lib2 - ) - -if (fileName) - message(SEND_ERROR "Found target lib2: ${fileName}") -else() - message("Could not find target lib2: ${fileName}") -endif() +function(verify_skipped_tgt name) + unset(fileName CACHE) + find_file (fileName ${name}.tgt.gpj + ${CMAKE_CURRENT_BINARY_DIR} + ) + + if (fileName) + message("Found target ${name}: ${fileName}") + else() + message(SEND_ERROR "Could not find target ${name}: ${fileName}") + endif() + + #test project was built + unset(fileName CACHE) + find_file (fileName lib${name}.a + ${CMAKE_CURRENT_BINARY_DIR} + ) + + if (fileName) + message(SEND_ERROR "Found target ${name}: ${fileName}") + else() + message("Could not find target ${name}: ${fileName}") + endif() +endfunction() + +function(locate_tgt name) + unset(fileName CACHE) + find_file (fileName ${name}.tgt.gpj + ${CMAKE_CURRENT_BINARY_DIR} + ) + + if (fileName) + message("Found target ${name}: ${fileName}") + else() + message(SEND_ERROR "Could not find target ${name}: ${fileName}") + endif() + + #test project was built + unset(fileName CACHE) + find_file (fileName lib${name}.a + ${CMAKE_CURRENT_BINARY_DIR} + ) + + if (fileName) + message( "Found target ${name}: ${fileName}") + else() + message(SEND_ERROR "Could not find target ${name}: ${fileName}") + endif() +endfunction() + +verify_skipped_tgt(lib1) +verify_skipped_tgt(lib2) +locate_tgt(lib3) diff --git a/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt b/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt index da80b51..2d21bfb 100644 --- a/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt +++ b/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt @@ -38,8 +38,7 @@ if (RUN_TEST STREQUAL "NO_FLAGS") else() unset(fileName CACHE) find_file(fileName exe1.gpj - ${CMAKE_CURRENT_BINARY_DIR}/link_build - ${CMAKE_CURRENT_BINARY_DIR}/link_build/exe1 + ${CMAKE_CURRENT_BINARY_DIR}/link_build/exe1.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -54,13 +53,14 @@ else() string(FIND "${fileText}" "${opt}" opt_found) if ( opt_found EQUAL -1 ) message(SEND_ERROR "Could not find: ${opt}") + else() + message("located: ${opt}") endif() endforeach() unset(fileName CACHE) find_file (fileName lib1.gpj - ${CMAKE_CURRENT_BINARY_DIR}/link_build - ${CMAKE_CURRENT_BINARY_DIR}/link_build/lib1 + ${CMAKE_CURRENT_BINARY_DIR}/link_build/lib1.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -71,13 +71,14 @@ else() string(FIND "${fileText}" "${opt}" opt_found) if (opt_found EQUAL -1) message(SEND_ERROR "Could not find: ${opt}") + else() + message("located: ${opt}") endif() endforeach() unset(fileName CACHE) find_file (fileName lib2.gpj - ${CMAKE_CURRENT_BINARY_DIR}/link_build - ${CMAKE_CURRENT_BINARY_DIR}/link_build/lib2 + ${CMAKE_CURRENT_BINARY_DIR}/link_build/lib2.dir ) message("Parsing project file: ${fileName}") file(STRINGS ${fileName} fileText) @@ -87,6 +88,8 @@ else() string(FIND "${fileText}" "${opt}" opt_found) if ( opt_found EQUAL -1 ) message(SEND_ERROR "Could not find: ${opt}") + else() + message("located: ${opt}") endif() endforeach() endif() diff --git a/Tests/GhsMulti/GhsMultiMultipleProjects/verify.cmake b/Tests/GhsMulti/GhsMultiMultipleProjects/verify.cmake index 3855215..b6af935 100644 --- a/Tests/GhsMulti/GhsMultiMultipleProjects/verify.cmake +++ b/Tests/GhsMulti/GhsMultiMultipleProjects/verify.cmake @@ -1,58 +1,38 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#test project was generated -unset(fileName CACHE) -find_file(fileName lib3.gpj - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/lib3 - ${CMAKE_CURRENT_BINARY_DIR}/examples - ) - -if (fileName) - message("Found target lib3: ${fileName}") -else() - message(SEND_ERROR "Could not find target lib3: ${fileName}") -endif() - -#test project was generated -unset(fileName CACHE) -find_file (fileName exe3.gpj - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/exe3 - ${CMAKE_CURRENT_BINARY_DIR}/examples - ) - -if (fileName) - message("Found target exe3: ${fileName}") -else() - message(SEND_ERROR "Could not find target exe3: ${fileName}") -endif() - -#test project was not built -unset(fileName CACHE) -find_file (fileName lib3.a - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/lib3 - ${CMAKE_CURRENT_BINARY_DIR}/examples - ) - -if (fileName) - message(SEND_ERROR "Found target lib3: ${fileName}") -else() - message("Could not find target lib3: ${fileName}") -endif() - -unset(fileName CACHE) -find_file (fileName NAMES exe3.as exe3 - HINTS - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/exe3 - ${CMAKE_CURRENT_BINARY_DIR}/examples - ) - -if (fileName) - message(SEND_ERROR "Found target exe3: ${fileName}") -else() - message("Could not find target exe3: ${fileName}") -endif() +function(verify_project_top name) + unset(fileName CACHE) + find_file (fileName ${name}.top.gpj + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/sub + ${CMAKE_CURRENT_BINARY_DIR}/examples + ) + + if (fileName) + message("Found target ${name}: ${fileName}") + else() + message(SEND_ERROR "Could not find project ${name}: ${fileName}") + endif() +endfunction() + +function(verify_exe_built name) + unset(fileName CACHE) + find_file (fileName ${name} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/sub + ) + + if (fileName) + message("Found target ${name}: ${fileName}") + else() + message(SEND_ERROR "Could not find project ${name}: ${fileName}") + endif() +endfunction() + +#test project top files were generated +verify_project_top(test) +verify_project_top(test2) +verify_project_top(test3) +verify_exe_built(exe1) +verify_exe_built(exe2) -- cgit v0.12 From 399e73b89a5e339e812cf4b02e63c45e18bcd49a Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Thu, 17 Mar 2022 19:38:41 -0400 Subject: GHS: release note --- Help/release/dev/ghs_predefined_targets.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Help/release/dev/ghs_predefined_targets.rst diff --git a/Help/release/dev/ghs_predefined_targets.rst b/Help/release/dev/ghs_predefined_targets.rst new file mode 100644 index 0000000..eeca5a9 --- /dev/null +++ b/Help/release/dev/ghs_predefined_targets.rst @@ -0,0 +1,6 @@ +ghs_predefined_targets +---------------------- + +* A new predefined target `RERUN_CMAKE` is added for + :generator:`Green Hills MULTI` generator to easily rerun + CMake if any CMake files were updated. -- cgit v0.12