summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-22 13:22:28 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-03-22 13:22:44 (GMT)
commit89abbdd8c8db5bf587373f2a00f6a816eddd8496 (patch)
tree815aaa6b4a54b6782bfb30550a20cfa6e4ee8ccb /Source
parent4e47e9967aa9d4cd76375468e3b175cd313f3877 (diff)
parent2c43fb5be345b75d12bba227979efd74b810b49a (diff)
downloadCMake-89abbdd8c8db5bf587373f2a00f6a816eddd8496.zip
CMake-89abbdd8c8db5bf587373f2a00f6a816eddd8496.tar.gz
CMake-89abbdd8c8db5bf587373f2a00f6a816eddd8496.tar.bz2
Merge topic 'ghs-linux'
2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator 0404efe786 GHS: Add support for GHS Multi Generator in Linux 2060a1445c Tests: Fix file name case in GHS object library test ddad70c8a4 Tests: Run GHS tests in a separate ctest process f7dca1fc97 GHS: Fix include-what-you-use and clang-tidy diagnostics Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3006
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt24
-rw-r--r--Source/cmGhsMultiGpj.cxx6
-rw-r--r--Source/cmGhsMultiGpj.h6
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx57
-rw-r--r--Source/cmGhsMultiTargetGenerator.h11
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx60
-rw-r--r--Source/cmGlobalGhsMultiGenerator.h22
-rw-r--r--Source/cmLocalGhsMultiGenerator.cxx13
-rw-r--r--Source/cmLocalGhsMultiGenerator.h11
-rw-r--r--Source/cmake.cxx9
10 files changed, 137 insertions, 82 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 596c7f5..52f6742 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -729,14 +729,6 @@ if (WIN32)
cmVisualStudioSlnParser.cxx
cmVisualStudioWCEPlatformParser.h
cmVisualStudioWCEPlatformParser.cxx
- cmGlobalGhsMultiGenerator.cxx
- cmGlobalGhsMultiGenerator.h
- cmLocalGhsMultiGenerator.cxx
- cmLocalGhsMultiGenerator.h
- cmGhsMultiTargetGenerator.cxx
- cmGhsMultiTargetGenerator.h
- cmGhsMultiGpj.cxx
- cmGhsMultiGpj.h
cmVSSetupHelper.cxx
cmVSSetupHelper.h
)
@@ -756,6 +748,22 @@ if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
)
endif()
+# GHS support
+# Works only for windows and linux
+if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(SRCS ${SRCS}
+ cmGlobalGhsMultiGenerator.cxx
+ cmGlobalGhsMultiGenerator.h
+ cmLocalGhsMultiGenerator.cxx
+ cmLocalGhsMultiGenerator.h
+ cmGhsMultiTargetGenerator.cxx
+ cmGhsMultiTargetGenerator.h
+ cmGhsMultiGpj.cxx
+ cmGhsMultiGpj.h
+ )
+endif()
+
+
# Ninja support
set(SRCS ${SRCS}
cmGlobalNinjaGenerator.cxx
diff --git a/Source/cmGhsMultiGpj.cxx b/Source/cmGhsMultiGpj.cxx
index c1f0742..8b69b51 100644
--- a/Source/cmGhsMultiGpj.cxx
+++ b/Source/cmGhsMultiGpj.cxx
@@ -2,7 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGhsMultiGpj.h"
-#include "cmGeneratedFileStream.h"
+#include <ostream>
static const char* GHS_TAG[] = { "[INTEGRITY Application]",
"[Library]",
@@ -11,7 +11,7 @@ static const char* GHS_TAG[] = { "[INTEGRITY Application]",
"[Reference]",
"[Subproject]" };
-const char* GhsMultiGpj::GetGpjTag(Types const gpjType)
+const char* GhsMultiGpj::GetGpjTag(Types gpjType)
{
char const* tag;
switch (gpjType) {
@@ -29,7 +29,7 @@ const char* GhsMultiGpj::GetGpjTag(Types const gpjType)
return tag;
}
-void GhsMultiGpj::WriteGpjTag(Types const gpjType, std::ostream& fout)
+void GhsMultiGpj::WriteGpjTag(Types gpjType, std::ostream& fout)
{
char const* tag;
tag = GhsMultiGpj::GetGpjTag(gpjType);
diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h
index 6d59225..420eab1 100644
--- a/Source/cmGhsMultiGpj.h
+++ b/Source/cmGhsMultiGpj.h
@@ -6,8 +6,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <iosfwd>
-class cmGeneratedFileStream;
-
class GhsMultiGpj
{
public:
@@ -21,9 +19,9 @@ public:
SUBPROJECT
};
- static void WriteGpjTag(Types const gpjType, std::ostream& fout);
+ static void WriteGpjTag(Types gpjType, std::ostream& fout);
- static const char* GetGpjTag(Types const gpjType);
+ static const char* GetGpjTag(Types gpjType);
};
#endif // ! cmGhsMultiGpjType_h
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index c73ec70..668bcbd 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -2,16 +2,29 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGhsMultiTargetGenerator.h"
-#include "cmComputeLinkInformation.h"
+#include "cmCustomCommand.h"
+#include "cmCustomCommandLines.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGhsMultiGenerator.h"
#include "cmLinkLineComputer.h"
+#include "cmLocalGenerator.h"
#include "cmLocalGhsMultiGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmSourceGroup.h"
+#include "cmStateDirectory.h"
+#include "cmStateSnapshot.h"
+#include "cmStateTypes.h"
+#include "cmSystemTools.h"
#include "cmTarget.h"
+#include "cmTargetDepend.h"
+
+#include <algorithm>
+#include <assert.h>
+#include <ostream>
+#include <set>
+#include <utility>
cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget* target)
: GeneratorTarget(target)
@@ -30,9 +43,7 @@ cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget* target)
}
}
-cmGhsMultiTargetGenerator::~cmGhsMultiTargetGenerator()
-{
-}
+cmGhsMultiTargetGenerator::~cmGhsMultiTargetGenerator() = default;
void cmGhsMultiTargetGenerator::Generate()
{
@@ -99,7 +110,7 @@ void cmGhsMultiTargetGenerator::GenerateTarget()
fname += "/";
fname += this->Name;
fname += cmGlobalGhsMultiGenerator::FILE_EXTENSION;
- cmGeneratedFileStream fout(fname.c_str());
+ cmGeneratedFileStream fout(fname);
fout.SetCopyIfDifferent(true);
this->GetGlobalGenerator()->WriteFileHeader(fout);
@@ -336,10 +347,9 @@ void cmGhsMultiTargetGenerator::WriteCustomCommandsHelper(
}
}
-void cmGhsMultiTargetGenerator::WriteSourceProperty(std::ostream& fout,
- const cmSourceFile* sf,
- std::string propName,
- std::string propFlag)
+void cmGhsMultiTargetGenerator::WriteSourceProperty(
+ std::ostream& fout, const cmSourceFile* sf, std::string const& propName,
+ std::string const& propFlag)
{
const char* prop = sf->GetProperty(propName);
if (prop) {
@@ -370,7 +380,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
this->Makefile->FindSourceGroup(sf->GetFullPath(), sourceGroups);
std::string gn = sourceGroup->GetFullName();
groupFiles[gn].push_back(sf);
- groupNames.insert(gn);
+ groupNames.insert(std::move(gn));
}
/* list of known groups and the order they are displayed in a project file */
@@ -397,7 +407,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
}
{ /* catch-all group - is last item */
- std::string gn = "";
+ std::string gn;
auto n = groupNames.find(gn);
if (n != groupNames.end()) {
groupFilesList.back() = *n;
@@ -446,7 +456,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
std::string fpath = this->LocalGenerator->GetCurrentBinaryDirectory();
fpath += "/";
fpath += lpath;
- cmGeneratedFileStream* f = new cmGeneratedFileStream(fpath.c_str());
+ cmGeneratedFileStream* f = new cmGeneratedFileStream(fpath);
f->SetCopyIfDifferent(true);
gfiles.push_back(f);
fout = f;
@@ -476,7 +486,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
if ("ld" != si->GetExtension() && "int" != si->GetExtension() &&
"bsp" != si->GetExtension()) {
- this->WriteObjectLangOverride(*fout, si);
+ WriteObjectLangOverride(*fout, si);
}
this->WriteSourceProperty(*fout, si, "INCLUDE_DIRECTORIES", "-I");
@@ -502,9 +512,9 @@ void cmGhsMultiTargetGenerator::WriteObjectLangOverride(
std::ostream& fout, const cmSourceFile* sourceFile)
{
const char* rawLangProp = sourceFile->GetProperty("LANGUAGE");
- if (NULL != rawLangProp) {
+ if (nullptr != rawLangProp) {
std::string sourceLangProp(rawLangProp);
- std::string extension(sourceFile->GetExtension());
+ std::string const& extension = sourceFile->GetExtension();
if ("CXX" == sourceLangProp && ("c" == extension || "C" == extension)) {
fout << " -dotciscxx" << std::endl;
}
@@ -540,20 +550,19 @@ void cmGhsMultiTargetGenerator::WriteReferences(std::ostream& fout)
}
}
-bool cmGhsMultiTargetGenerator::DetermineIfIntegrityApp(void)
+bool cmGhsMultiTargetGenerator::DetermineIfIntegrityApp()
{
const char* p = this->GeneratorTarget->GetProperty("ghs_integrity_app");
if (p) {
return cmSystemTools::IsOn(
this->GeneratorTarget->GetProperty("ghs_integrity_app"));
- } else {
- std::vector<cmSourceFile*> sources;
- this->GeneratorTarget->GetSourceFiles(sources, this->ConfigName);
- for (auto& sf : sources) {
- if ("int" == sf->GetExtension()) {
- return true;
- }
+ }
+ std::vector<cmSourceFile*> sources;
+ this->GeneratorTarget->GetSourceFiles(sources, this->ConfigName);
+ for (auto& sf : sources) {
+ if ("int" == sf->GetExtension()) {
+ return true;
}
- return false;
}
+ return false;
}
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index a241cc6..a4e23d9 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -7,8 +7,12 @@
#include "cmTarget.h"
+#include <iosfwd>
+#include <map>
+#include <string>
+#include <vector>
+
class cmCustomCommand;
-class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmGlobalGhsMultiGenerator;
class cmLocalGhsMultiGenerator;
@@ -51,12 +55,13 @@ private:
cmTarget::CustomCommandType commandType);
void WriteSources(std::ostream& fout_proj);
void WriteSourceProperty(std::ostream& fout, const cmSourceFile* sf,
- std::string propName, std::string propFlag);
+ std::string const& propName,
+ std::string const& propFlag);
void WriteReferences(std::ostream& fout);
static void WriteObjectLangOverride(std::ostream& fout,
const cmSourceFile* sourceFile);
- bool DetermineIfIntegrityApp(void);
+ bool DetermineIfIntegrityApp();
cmGeneratorTarget* GeneratorTarget;
cmLocalGhsMultiGenerator* LocalGenerator;
cmMakefile* Makefile;
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index dba9afa..e6a1d78 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -2,22 +2,33 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalGhsMultiGenerator.h"
-#include "cmsys/SystemTools.hxx"
-
-#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
-#include "cmGhsMultiTargetGenerator.h"
+#include "cmGhsMultiGpj.h"
+#include "cmLocalGenerator.h"
#include "cmLocalGhsMultiGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
+#include "cmStateTypes.h"
+#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
+#include <algorithm>
+#include <map>
+#include <ostream>
+#include <string.h>
+#include <utility>
+
const char* cmGlobalGhsMultiGenerator::FILE_EXTENSION = ".gpj";
+#ifdef __linux__
+const char* cmGlobalGhsMultiGenerator::DEFAULT_BUILD_PROGRAM = "gbuild";
+const char* cmGlobalGhsMultiGenerator::DEFAULT_TOOLSET_ROOT = "/usr/ghs";
+#elif defined(_WIN32)
const char* cmGlobalGhsMultiGenerator::DEFAULT_BUILD_PROGRAM = "gbuild.exe";
const char* cmGlobalGhsMultiGenerator::DEFAULT_TOOLSET_ROOT = "C:/ghs";
+#endif
cmGlobalGhsMultiGenerator::cmGlobalGhsMultiGenerator(cmake* cm)
: cmGlobalGenerator(cm)
@@ -25,9 +36,7 @@ cmGlobalGhsMultiGenerator::cmGlobalGhsMultiGenerator(cmake* cm)
cm->GetState()->SetGhsMultiIDE(true);
}
-cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator()
-{
-}
+cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator() = default;
cmLocalGenerator* cmGlobalGhsMultiGenerator::CreateLocalGenerator(
cmMakefile* mf)
@@ -64,7 +73,8 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts,
/* no toolset was found */
if (tsp.empty()) {
return false;
- } else if (ts.empty()) {
+ }
+ if (ts.empty()) {
std::string message;
message =
"Green Hills MULTI: -T <toolset> not specified; defaulting to \"";
@@ -86,7 +96,7 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts,
const char* prevTool = mf->GetDefinition("CMAKE_MAKE_PROGRAM");
/* check if the toolset changed from last generate */
- if (prevTool != NULL && (gbuild != prevTool)) {
+ if (prevTool != nullptr && (gbuild != prevTool)) {
std::string message = "toolset build tool: ";
message += gbuild;
message += "\nDoes not match the previously used build tool: ";
@@ -95,13 +105,12 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts,
"directory or choose a different binary directory.";
cmSystemTools::Error(message);
return false;
- } else {
- /* store the toolset that is being used for this build */
- mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", gbuild.c_str(),
- "build program to use", cmStateEnums::INTERNAL,
- true);
}
+ /* store the toolset that is being used for this build */
+ mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", gbuild.c_str(),
+ "build program to use", cmStateEnums::INTERNAL, true);
+
mf->AddDefinition("CMAKE_SYSTEM_VERSION", tsp.c_str());
return true;
@@ -110,7 +119,7 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts,
bool cmGlobalGhsMultiGenerator::SetGeneratorPlatform(std::string const& p,
cmMakefile* mf)
{
- if (p == "") {
+ if (p.empty()) {
cmSystemTools::Message(
"Green Hills MULTI: -A <arch> not specified; defaulting to \"arm\"");
std::string arch = "arm";
@@ -201,7 +210,7 @@ void cmGlobalGhsMultiGenerator::WriteFileHeader(std::ostream& fout)
fout << "#!gbuild" << std::endl;
fout << "#" << std::endl
<< "# CMAKE generated file: DO NOT EDIT!" << std::endl
- << "# Generated by \"" << this->GetActualName() << "\""
+ << "# Generated by \"" << GetActualName() << "\""
<< " Generator, CMake Version " << cmVersion::GetMajorVersion() << "."
<< cmVersion::GetMinorVersion() << std::endl
<< "#" << std::endl
@@ -296,7 +305,7 @@ void cmGlobalGhsMultiGenerator::WriteSubProjects(
if (projName && projType) {
cmLocalGenerator* lg = target->GetLocalGenerator();
std::string dir = lg->GetCurrentBinaryDirectory();
- dir = root->MaybeConvertToRelativePath(rootBinaryDir, dir.c_str());
+ dir = root->MaybeConvertToRelativePath(rootBinaryDir, dir);
if (dir == ".") {
dir.clear();
} else {
@@ -319,7 +328,7 @@ void cmGlobalGhsMultiGenerator::WriteSubProjects(
fname += "REF";
fname += FILE_EXTENSION;
- cmGeneratedFileStream fref(fname.c_str());
+ cmGeneratedFileStream fref(fname);
fref.SetCopyIfDifferent(true);
this->WriteFileHeader(fref);
@@ -360,7 +369,7 @@ void cmGlobalGhsMultiGenerator::OutputTopLevelProject(
fname += ".top";
fname += FILE_EXTENSION;
- cmGeneratedFileStream fout(fname.c_str());
+ cmGeneratedFileStream fout(fname);
fout.SetCopyIfDifferent(true);
this->WriteTopLevelProject(fout, root, generators);
@@ -376,9 +385,12 @@ cmGlobalGhsMultiGenerator::GenerateBuildCommand(
std::vector<std::string> const& makeOptions)
{
GeneratedMakeCommand makeCommand = {};
- const char* gbuild =
- this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
- makeCommand.Add(this->SelectMakeProgram(makeProgram, (std::string)gbuild));
+ std::string gbuild;
+ if (const char* gbuildCached =
+ this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM")) {
+ gbuild = gbuildCached;
+ }
+ makeCommand.Add(this->SelectMakeProgram(makeProgram, gbuild));
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
makeCommand.Add("-parallel");
@@ -424,7 +436,7 @@ void cmGlobalGhsMultiGenerator::WriteMacros(std::ostream& fout)
{
char const* ghsGpjMacros =
this->GetCMakeInstance()->GetCacheDefinition("GHS_GPJ_MACROS");
- if (NULL != ghsGpjMacros) {
+ if (nullptr != ghsGpjMacros) {
std::vector<std::string> expandedList;
cmSystemTools::ExpandListArgument(std::string(ghsGpjMacros), expandedList);
for (std::string const& arg : expandedList) {
@@ -457,7 +469,7 @@ void cmGlobalGhsMultiGenerator::WriteHighLevelDirectives(std::ostream& fout)
char const* const customization =
this->GetCMakeInstance()->GetCacheDefinition("GHS_CUSTOMIZATION");
- if (NULL != customization && strlen(customization) > 0) {
+ if (nullptr != customization && strlen(customization) > 0) {
fout << "customization=" << trimQuotes(customization) << std::endl;
this->GetCMakeInstance()->MarkCliAsUsed("GHS_CUSTOMIZATION");
}
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index c39f40f..f8df6ef 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -5,10 +5,20 @@
#include "cmGlobalGenerator.h"
-#include "cmGhsMultiGpj.h"
#include "cmGlobalGeneratorFactory.h"
+#include "cmTargetDepend.h"
-class cmGeneratedFileStream;
+#include <iosfwd>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+class cmGeneratorTarget;
+class cmLocalGenerator;
+class cmMakefile;
+class cmake;
+struct cmDocumentationEntry;
class cmGlobalGhsMultiGenerator : public cmGlobalGenerator
{
@@ -17,7 +27,7 @@ public:
static const char* FILE_EXTENSION;
cmGlobalGhsMultiGenerator(cmake* cm);
- ~cmGlobalGhsMultiGenerator();
+ ~cmGlobalGhsMultiGenerator() override;
static cmGlobalGeneratorFactory* NewFactory()
{
@@ -31,7 +41,7 @@ public:
static std::string GetActualName() { return "Green Hills MULTI"; }
///! Get the name for this generator
- std::string GetName() const override { return this->GetActualName(); }
+ std::string GetName() const override { return GetActualName(); }
/// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
static void GetDocumentation(cmDocumentationEntry& entry);
@@ -77,8 +87,8 @@ public:
std::string First;
public:
- TargetCompare(std::string const& first)
- : First(first)
+ TargetCompare(std::string first)
+ : First(std::move(first))
{
}
bool operator()(cmGeneratorTarget const* l,
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index 125e8b5..bf25f98 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -2,12 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalGhsMultiGenerator.h"
-#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGhsMultiTargetGenerator.h"
-#include "cmGlobalGhsMultiGenerator.h"
-#include "cmMakefile.h"
+#include "cmGlobalGenerator.h"
#include "cmSourceFile.h"
+#include "cmStateTypes.h"
+#include "cmSystemTools.h"
+
+#include <algorithm>
+#include <utility>
cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
cmMakefile* mf)
@@ -15,9 +18,7 @@ cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
{
}
-cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator()
-{
-}
+cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() = default;
std::string cmLocalGhsMultiGenerator::GetTargetDirectory(
cmGeneratorTarget const* target) const
diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h
index 2584fd3..b6ccd08 100644
--- a/Source/cmLocalGhsMultiGenerator.h
+++ b/Source/cmLocalGhsMultiGenerator.h
@@ -5,7 +5,14 @@
#include "cmLocalGenerator.h"
-class cmGeneratedFileStream;
+#include <map>
+#include <string>
+#include <vector>
+
+class cmGeneratorTarget;
+class cmGlobalGenerator;
+class cmMakefile;
+class cmSourceFile;
/** \class cmLocalGhsMultiGenerator
* \brief Write Green Hills MULTI project files.
@@ -18,7 +25,7 @@ class cmLocalGhsMultiGenerator : public cmLocalGenerator
public:
cmLocalGhsMultiGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
- virtual ~cmLocalGhsMultiGenerator();
+ ~cmLocalGhsMultiGenerator() override;
/**
* Generate the makefile for this directory.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e1b775e..8c1a359 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -48,7 +48,6 @@
#if defined(_WIN32) && !defined(__CYGWIN__)
# if !defined(CMAKE_BOOT_MINGW)
# include "cmGlobalBorlandMakefileGenerator.h"
-# include "cmGlobalGhsMultiGenerator.h"
# include "cmGlobalJOMMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h"
# include "cmGlobalVisualStudio10Generator.h"
@@ -84,6 +83,10 @@
# include "cmExtraEclipseCDT4Generator.h"
#endif
+#if defined(__linux__) || defined(_WIN32)
+# include "cmGlobalGhsMultiGenerator.h"
+#endif
+
#if defined(__APPLE__)
# if defined(CMAKE_BUILD_WITH_CMAKE)
# include "cmGlobalXCodeGenerator.h"
@@ -1833,13 +1836,15 @@ void cmake::AddDefaultGenerators()
this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalJOMMakefileGenerator::NewFactory());
- this->Generators.push_back(cmGlobalGhsMultiGenerator::NewFactory());
# endif
this->Generators.push_back(cmGlobalMSYSMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalMinGWMakefileGenerator::NewFactory());
#endif
this->Generators.push_back(cmGlobalUnixMakefileGenerator3::NewFactory());
#if defined(CMAKE_BUILD_WITH_CMAKE)
+# if defined(__linux__) || defined(_WIN32)
+ this->Generators.push_back(cmGlobalGhsMultiGenerator::NewFactory());
+# endif
this->Generators.push_back(cmGlobalNinjaGenerator::NewFactory());
#endif
#if defined(CMAKE_USE_WMAKE)