diff options
author | Geoff Viola <geoffrey.viola@asirobots.com> | 2016-03-27 03:28:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-28 15:44:58 (GMT) |
commit | 230d50ed1a1bbeac3b840ecc2d45c1b8710c8be4 (patch) | |
tree | d86149b434e3168bc833589914b5ce7341300aed /Modules/Compiler | |
parent | d29004756fa314119a91821a14eef81a2ffcf40a (diff) | |
download | CMake-230d50ed1a1bbeac3b840ecc2d45c1b8710c8be4.zip CMake-230d50ed1a1bbeac3b840ecc2d45c1b8710c8be4.tar.gz CMake-230d50ed1a1bbeac3b840ecc2d45c1b8710c8be4.tar.bz2 |
GHS: Factor out compiler information shared among languages
Move common information in `Modules/Compiler/GHS-*.cmake` over to a
common `Modules/Compiler/GHS.cmake` and include it.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GHS-C.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/GHS-CXX.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/GHS.cmake | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/Modules/Compiler/GHS-C.cmake b/Modules/Compiler/GHS-C.cmake index a58d9b0..50532ce 100644 --- a/Modules/Compiler/GHS-C.cmake +++ b/Modules/Compiler/GHS-C.cmake @@ -1,3 +1,5 @@ +include(Compiler/GHS) + set(CMAKE_C_VERBOSE_FLAG "-v") set(CMAKE_C_FLAGS_INIT "") @@ -12,8 +14,6 @@ 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}") -set(CMAKE_EXECUTABLE_SUFFIX ".as") - 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.") diff --git a/Modules/Compiler/GHS-CXX.cmake b/Modules/Compiler/GHS-CXX.cmake index 9e202d3..2cffa0d 100644 --- a/Modules/Compiler/GHS-CXX.cmake +++ b/Modules/Compiler/GHS-CXX.cmake @@ -1,3 +1,5 @@ +include(Compiler/GHS) + set(CMAKE_CXX_VERBOSE_FLAG "-v") set(CMAKE_CXX_FLAGS_INIT "") @@ -15,8 +17,6 @@ set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE_INIT set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT "-ldebug ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}") -set(CMAKE_EXECUTABLE_SUFFIX ".as") - if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) set (CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG "${CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT}" diff --git a/Modules/Compiler/GHS.cmake b/Modules/Compiler/GHS.cmake new file mode 100644 index 0000000..cfc29c2 --- /dev/null +++ b/Modules/Compiler/GHS.cmake @@ -0,0 +1,6 @@ +if(__COMPILER_GHS) + return() +endif() +set(__COMPILER_GHS 1) + +set(CMAKE_EXECUTABLE_SUFFIX ".as") |