summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.h
diff options
context:
space:
mode:
authorFred Baksik <frodak17@gmail.com>2019-04-08 13:55:35 (GMT)
committerFred Baksik <frodak17@gmail.com>2019-04-11 17:15:51 (GMT)
commit83c47ef5b8a6b1a63edbd82092d8eae68da453d6 (patch)
tree1521a0a54e76fab9fd0fd4e7d6c3867b59a40db6 /Source/cmGlobalGhsMultiGenerator.h
parent5d2e1404bdfa83eeae5b361bd7d8a882aadc7242 (diff)
downloadCMake-83c47ef5b8a6b1a63edbd82092d8eae68da453d6.zip
CMake-83c47ef5b8a6b1a63edbd82092d8eae68da453d6.tar.gz
CMake-83c47ef5b8a6b1a63edbd82092d8eae68da453d6.tar.bz2
GHS: Update project layout to accommodate gbuild inconsistencies
-- Do not use reference projects, use build hierarchy instead. gbuild has three parallel levels: * low -- Parallelizes compiling source files within a single project (.gpj) file when safe to do so. * medium -- Parallelizes processing files within a single linked output when safe to do so. * high [default] -- Parallelizes processing files whenever safe to do so, including linking task. Testing showed that for some combinations of gbuild / MULTI there are issues with building a project that uses references to target project files along with using {nobuild} option. Sometimes the archiving of a library and linking of an executable were happening in parallel and the build would fail when linking because the archive wasn't complete. This behavior was also inconsistent when running the build from MULTI and from the command line with gbuild. In some cases MULTI did not parallelize archiving and linking, but gbuild performed these actions in parallel. The parallel build issue was not seen when using a build hierarchy where the project listed the project files normally instead of using a reference link. The other option was to add the -parallel_level=medium to the command line when using "cmake --build" but this wouldn't fix the issue if gbuild itself was used to and the user might not be aware of the extra option used by cmake.
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.h')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index a964af8..98358c7 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -98,17 +98,15 @@ private:
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, cmLocalGenerator* root);
+ void WriteSubProjects(std::ostream& fout, std::string& all_target);
void WriteTargets(cmLocalGenerator* root);
- void WriteProjects(cmLocalGenerator* root);
void WriteProjectLine(std::ostream& fout, cmGeneratorTarget const* target,
cmLocalGenerator* root, std::string& rootBinaryDir);
- void WriteProjectRefLine(std::ostream& fout, cmGeneratorTarget const* target,
- cmLocalGenerator* root, std::string& rootBinaryDir);
void WriteCustomRuleBOD(std::ostream& fout);
void WriteCustomTargetBOD(std::ostream& fout);
void WriteAllTarget(cmLocalGenerator* root,
- std::vector<cmLocalGenerator*>& generators);
+ std::vector<cmLocalGenerator*>& generators,
+ std::string& all_target);
std::string TrimQuotes(std::string const& str);