summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index f2f43e3..e850e05 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -315,8 +315,26 @@ void cmGlobalGhsMultiGenerator::WriteSubProjects(
if (cmSystemTools::IsOn(target->GetProperty("EXCLUDE_FROM_ALL"))) {
fout << "{comment} ";
}
- fout << dir << projName << FILE_EXTENSION;
+ std::string projFile = dir + projName + FILE_EXTENSION;
+ fout << projFile;
fout << " " << projType << std::endl;
+
+ if (cmSystemTools::IsOn(target->GetProperty("GHS_REFERENCE_PROJECT"))) {
+ // create reference project
+ std::string fname = dir;
+ fname += target->GetName();
+ fname += "REF";
+ fname += FILE_EXTENSION;
+
+ cmGeneratedFileStream fref(fname.c_str());
+ fref.SetCopyIfDifferent(true);
+
+ this->WriteFileHeader(fref);
+ GhsMultiGpj::WriteGpjTag(GhsMultiGpj::REFERENCE, fref);
+ fref << " :reference=" << projFile << std::endl;
+
+ fref.Close();
+ }
}
}
}