summaryrefslogtreecommitdiff
path: root/Source/cmGhsMultiTargetGenerator.cxx
diff options
context:
space:
mode:
authorFred Baksik <frodak17@gmail.com>2019-04-08 09:55:35 -0400
committerFred Baksik <frodak17@gmail.com>2019-04-11 13:15:51 -0400
commit83c47ef5b8a6b1a63edbd82092d8eae68da453d6 (patch)
tree1521a0a54e76fab9fd0fd4e7d6c3867b59a40db6 /Source/cmGhsMultiTargetGenerator.cxx
parent5d2e1404bdfa83eeae5b361bd7d8a882aadc7242 (diff)
downloadcmake-83c47ef5b8a6b1a63edbd82092d8eae68da453d6.tar.gz
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/cmGhsMultiTargetGenerator.cxx')
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx23
1 files changed, 0 insertions, 23 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index f59d410650..b80da7231f 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -143,8 +143,6 @@ void cmGhsMultiTargetGenerator::GenerateTarget()
}
this->WriteSources(fout);
fout.Close();
-
- this->WriteReferenceFile(fproj);
}
cmGlobalGhsMultiGenerator* cmGhsMultiTargetGenerator::GetGlobalGenerator()
@@ -735,27 +733,6 @@ void cmGhsMultiTargetGenerator::WriteObjectLangOverride(
}
}
-void cmGhsMultiTargetGenerator::WriteReferenceFile(std::string fproj)
-{
- // Open the target ref file in copy-if-different mode.
- std::string fname = this->LocalGenerator->GetCurrentBinaryDirectory();
- fname += "/";
- fname += this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
- fname += "/";
- fname += this->Name + "_REF" + cmGlobalGhsMultiGenerator::FILE_EXTENSION;
- cmGeneratedFileStream fref(fname);
- fref.SetCopyIfDifferent(true);
- this->GetGlobalGenerator()->WriteFileHeader(fref);
- GhsMultiGpj::WriteGpjTag(GhsMultiGpj::REFERENCE, fref);
- fref << " :reference=CMakeFiles/${PROJ_NAME}.project.gpj;" << fproj
- << std::endl;
- fref.Close();
-
- // Store location of the reference file
- this->GeneratorTarget->Target->SetProperty("GHS_REFERENCE_PROJECT",
- fname.c_str());
-}
-
bool cmGhsMultiTargetGenerator::DetermineIfIntegrityApp()
{
const char* p = this->GeneratorTarget->GetProperty("ghs_integrity_app");