diff options
author | Naren Manimohan <narendhar15@gmail.com> | 2019-03-21 16:00:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-03-21 16:57:40 (GMT) |
commit | 0404efe786b1e2c5c28065a53e55ec77217e7b49 (patch) | |
tree | 57e5ad638820c1894bf070b51741c454cb6b7584 /Source | |
parent | 2060a1445c6c6350eb886cfe70f956dccaef798e (diff) | |
download | CMake-0404efe786b1e2c5c28065a53e55ec77217e7b49.zip CMake-0404efe786b1e2c5c28065a53e55ec77217e7b49.tar.gz CMake-0404efe786b1e2c5c28065a53e55ec77217e7b49.tar.bz2 |
GHS: Add support for GHS Multi Generator in Linux
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 24 | ||||
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmake.cxx | 9 |
3 files changed, 28 insertions, 10 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 696826f..f65e78f 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -727,14 +727,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 ) @@ -754,6 +746,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/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index dd2e100..690398f 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -22,8 +22,13 @@ #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) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 08e284e..69dc26b 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) |