summaryrefslogtreecommitdiff
path: root/Source/cmGhsMultiTargetGenerator.cxx
diff options
context:
space:
mode:
authorFred Baksik <frodak17@gmail.com>2019-01-05 11:01:22 -0500
committerFred Baksik <frodak17@gmail.com>2019-01-16 10:41:38 -0500
commit14f3ba205989a422f1668073a325b057cece0b32 (patch)
tree16c0289473b6c09183b912777be626d76e9bd8c6 /Source/cmGhsMultiTargetGenerator.cxx
parent702121c5f3eceeb6b74ede845f1e1297cf113c47 (diff)
downloadcmake-14f3ba205989a422f1668073a325b057cece0b32.tar.gz
GHS: EXCLUDE_FROM_ALL updates
-- Excluded targets should be generated but not included in build ALL -- Use the correct source list for this configuration when writing sources
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.cxx')
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx79
1 files changed, 29 insertions, 50 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 0cd631206d..5e6224f2ad 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -108,56 +108,34 @@ void cmGhsMultiTargetGenerator::Generate()
void cmGhsMultiTargetGenerator::GenerateTarget()
{
- // Skip if empty or not included in build
- if (!this->GetSources().empty() && this->IncludeThisTarget()) {
-
- // Open the filestream in copy-if-different mode.
- std::string fname = this->LocalGenerator->GetCurrentBinaryDirectory();
- fname += "/";
- fname += this->Name;
- fname += cmGlobalGhsMultiGenerator::FILE_EXTENSION;
- cmGeneratedFileStream fout(fname.c_str());
- fout.SetCopyIfDifferent(true);
-
- this->GetGlobalGenerator()->WriteFileHeader(fout);
- GhsMultiGpj::WriteGpjTag(this->TagType, fout);
- const std::string language(
- this->GeneratorTarget->GetLinkerLanguage(this->ConfigName));
- this->DynamicDownload =
- this->DetermineIfDynamicDownload(this->ConfigName, language);
- if (this->DynamicDownload) {
- fout << "#component integrity_dynamic_download" << std::endl;
- }
- this->WriteTargetSpecifics(fout, this->ConfigName);
- this->SetCompilerFlags(this->ConfigName, language);
- this->WriteCompilerFlags(fout, this->ConfigName, language);
- this->WriteCompilerDefinitions(fout, this->ConfigName, language);
- this->WriteIncludes(fout, this->ConfigName, language);
- this->WriteTargetLinkLine(fout, this->ConfigName);
- this->WriteCustomCommands(fout);
- this->WriteSources(fout);
-
- fout.Close();
- }
-}
-
-bool cmGhsMultiTargetGenerator::IncludeThisTarget()
-{
- bool output = true;
- char const* excludeFromAll =
- this->GeneratorTarget->GetProperty("EXCLUDE_FROM_ALL");
- if (NULL != excludeFromAll && '1' == excludeFromAll[0] &&
- '\0' == excludeFromAll[1]) {
- output = false;
+ // Open the filestream in copy-if-different mode.
+ std::string fname = this->LocalGenerator->GetCurrentBinaryDirectory();
+ fname += "/";
+ fname += this->Name;
+ fname += cmGlobalGhsMultiGenerator::FILE_EXTENSION;
+ cmGeneratedFileStream fout(fname.c_str());
+ fout.SetCopyIfDifferent(true);
+
+ this->GetGlobalGenerator()->WriteFileHeader(fout);
+ GhsMultiGpj::WriteGpjTag(this->TagType, fout);
+
+ const std::string language(
+ this->GeneratorTarget->GetLinkerLanguage(this->ConfigName));
+ this->DynamicDownload =
+ this->DetermineIfDynamicDownload(this->ConfigName, language);
+ if (this->DynamicDownload) {
+ fout << "#component integrity_dynamic_download" << std::endl;
}
- return output;
-}
-
-std::vector<cmSourceFile*> cmGhsMultiTargetGenerator::GetSources() const
-{
- std::vector<cmSourceFile*> output;
- this->GeneratorTarget->GetSourceFiles(output, this->ConfigName);
- return output;
+ this->WriteTargetSpecifics(fout, this->ConfigName);
+ this->SetCompilerFlags(this->ConfigName, language);
+ this->WriteCompilerFlags(fout, this->ConfigName, language);
+ this->WriteCompilerDefinitions(fout, this->ConfigName, language);
+ this->WriteIncludes(fout, this->ConfigName, language);
+ this->WriteTargetLinkLine(fout, this->ConfigName);
+ this->WriteCustomCommands(fout);
+ this->WriteSources(fout);
+
+ fout.Close();
}
cmGlobalGhsMultiGenerator* cmGhsMultiTargetGenerator::GetGlobalGenerator()
@@ -431,7 +409,8 @@ cmGhsMultiTargetGenerator::GetObjectNames(
void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
{
/* vector of all sources for this target */
- std::vector<cmSourceFile*> sources = this->GetSources();
+ std::vector<cmSourceFile*> sources;
+ this->GeneratorTarget->GetSourceFiles(sources, this->ConfigName);
/* vector of all groups defined for this target
* -- but the vector is not expanded with sub groups or in any useful order