summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorGeoff Viola <geoffrey.viola@asirobots.com>2015-03-24 05:12:55 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-20 17:55:40 (GMT)
commit48004d9dbeb2af20d3a8df66670323d924a3f4c6 (patch)
treee3135a857d1c51d34f424fe09f561a249bf9a35d /Modules/Compiler
parent051d8be17f1b36d52041bfe61856b926e36dfb8c (diff)
downloadCMake-48004d9dbeb2af20d3a8df66670323d924a3f4c6.zip
CMake-48004d9dbeb2af20d3a8df66670323d924a3f4c6.tar.gz
CMake-48004d9dbeb2af20d3a8df66670323d924a3f4c6.tar.bz2
Add a 'Green Hills MULTI' generator on Windows
Green Hills MULTI is an IDE for embedded real-time systems. The IDE's product page can be found here: http://www.ghs.com/products/MULTI_IDE.html It supports cross compiling on ARM, Intel x86, and other architectures with various operating systems. The IDE exists on Linux and Windows host systems, but CMake will currently only generate the project files on Windows host systems.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GHS-C.cmake27
-rw-r--r--Modules/Compiler/GHS-CXX.cmake31
-rw-r--r--Modules/Compiler/GHS-DetermineCompiler.cmake6
3 files changed, 64 insertions, 0 deletions
diff --git a/Modules/Compiler/GHS-C.cmake b/Modules/Compiler/GHS-C.cmake
new file mode 100644
index 0000000..e97d62c
--- /dev/null
+++ b/Modules/Compiler/GHS-C.cmake
@@ -0,0 +1,27 @@
+set(CMAKE_C_VERBOSE_FLAG "-v")
+
+set(CMAKE_C_FLAGS_INIT "")
+set(CMAKE_C_FLAGS_DEBUG_INIT "-Odebug -g")
+set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Ospace")
+set(CMAKE_C_FLAGS_RELEASE_INIT "-O")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O -g")
+
+set(CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_C_FLAGS_DEBUG_INIT}")
+set(CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT}")
+set(CMAKE_C_GHS_KERNEL_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT}")
+set(CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT
+ "-ldebug ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}")
+
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ set (CMAKE_C_GHS_KERNEL_FLAGS_DEBUG "${CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT}"
+ CACHE STRING "Kernel flags used by the compiler during debug builds.")
+ set (CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL
+ "${CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Kernel flags used by the compiler during release builds for minimum size.")
+ set (CMAKE_C_GHS_KERNEL_FLAGS_RELEASE
+ "${CMAKE_C_GHS_KERNEL_FLAGS_RELEASE_INIT}"
+ CACHE STRING "Kernel flags used by the compiler during release builds.")
+ set (CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO
+ "${CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Kernel flags used by the compiler during release builds with debug info.")
+endif()
diff --git a/Modules/Compiler/GHS-CXX.cmake b/Modules/Compiler/GHS-CXX.cmake
new file mode 100644
index 0000000..71a0dec
--- /dev/null
+++ b/Modules/Compiler/GHS-CXX.cmake
@@ -0,0 +1,31 @@
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
+
+set(CMAKE_CXX_FLAGS_INIT "")
+set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Odebug -g")
+set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Ospace")
+set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O -g")
+
+set(CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT
+ "-ldebug ${CMAKE_CXX_FLAGS_DEBUG_INIT}")
+set(CMAKE_CXX_GHS_KERNEL_FLAGS_MINSIZEREL_INIT
+ "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}")
+set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE_INIT
+ "${CMAKE_CXX_FLAGS_RELEASE_INIT}")
+set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT
+ "-ldebug ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}")
+
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ set (CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG
+ "${CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT}"
+ CACHE STRING "Kernel flags used by the compiler during debug builds.")
+ set (CMAKE_CXX_GHS_KERNEL_FLAGS_MINSIZEREL
+ "${CMAKE_CXX_GHS_KERNEL_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Kernel flags used by the compiler during release builds for minimum size.")
+ set (CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE
+ "${CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE_INIT}"
+ CACHE STRING "Kernel flags used by the compiler during release builds.")
+ set (CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO
+ "${CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Kernel flags used by the compiler during release builds with debug info.")
+endif()
diff --git a/Modules/Compiler/GHS-DetermineCompiler.cmake b/Modules/Compiler/GHS-DetermineCompiler.cmake
new file mode 100644
index 0000000..56d24e2
--- /dev/null
+++ b/Modules/Compiler/GHS-DetermineCompiler.cmake
@@ -0,0 +1,6 @@
+set(_compiler_id_pp_test "defined(__INTEGRITY)")
+
+set(_compiler_id_version_compute "
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__INTEGRITY_MAJOR_VERSION)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__INTEGRITY_MINOR_VERSION)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__INTEGRITY_PATCH_VERSION)")