summaryrefslogtreecommitdiffstats
path: root/Source/cmGhsMultiGpj.cxx
diff options
context:
space:
mode:
authorFred Baksik <frodak17@gmail.com>2019-01-05 16:01:21 (GMT)
committerFred Baksik <frodak17@gmail.com>2019-01-16 15:41:20 (GMT)
commitead7117afda23d7cf0c1466ce5229d06240d3de0 (patch)
treed6f73008a1c387f27d3ef3834681ac5edd8c3897 /Source/cmGhsMultiGpj.cxx
parente7825386e2e9e69728e5a5c3dcbc94814bb7cb1c (diff)
downloadCMake-ead7117afda23d7cf0c1466ce5229d06240d3de0.zip
CMake-ead7117afda23d7cf0c1466ce5229d06240d3de0.tar.gz
CMake-ead7117afda23d7cf0c1466ce5229d06240d3de0.tar.bz2
GHS: Update the top-level project generation
-- Sort targets by name -- Generate a top-level project for each project command named as project.top.gpj Use the target set for the current project instead of assuming all targets -- Add support for building projects not in binary root -- Directly create files and pass ostream -- Do no generate project files for UTILITY targets; this was never supported -- Do no generate project files for OBJECT, SHARED, or MODULE libraries; this was never supported -- Update GHS tags to support project types NOTE: The default tag is changed to "" because "[ ]" is an invalid token in project file
Diffstat (limited to 'Source/cmGhsMultiGpj.cxx')
-rw-r--r--Source/cmGhsMultiGpj.cxx32
1 files changed, 18 insertions, 14 deletions
diff --git a/Source/cmGhsMultiGpj.cxx b/Source/cmGhsMultiGpj.cxx
index f58cfc1..c0f37ba 100644
--- a/Source/cmGhsMultiGpj.cxx
+++ b/Source/cmGhsMultiGpj.cxx
@@ -4,31 +4,35 @@
#include "cmGeneratedFileStream.h"
-void GhsMultiGpj::WriteGpjTag(Types const gpjType,
- cmGeneratedFileStream* const filestream)
+static const char* GHS_TAG[] = { "[INTEGRITY Application]",
+ "[Library]",
+ "[Project]",
+ "[Program]",
+ "[Reference]",
+ "[Subproject]" };
+
+const char* GhsMultiGpj::GetGpjTag(Types const gpjType)
{
char const* tag;
switch (gpjType) {
case INTERGRITY_APPLICATION:
- tag = "INTEGRITY Application";
- break;
case LIBRARY:
- tag = "Library";
- break;
case PROJECT:
- tag = "Project";
- break;
case PROGRAM:
- tag = "Program";
- break;
case REFERENCE:
- tag = "Reference";
- break;
case SUBPROJECT:
- tag = "Subproject";
+ tag = GHS_TAG[gpjType];
break;
default:
tag = "";
}
- *filestream << "[" << tag << "]" << std::endl;
+ return tag;
+}
+
+void GhsMultiGpj::WriteGpjTag(Types const gpjType,
+ cmGeneratedFileStream* const filestream)
+{
+ char const* tag;
+ tag = GhsMultiGpj::GetGpjTag(gpjType);
+ *filestream << tag << std::endl;
}