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.
This commit is contained in:
Geoff Viola 2016-03-26 21:28:31 -06:00 committed by Brad King
parent d29004756f
commit 230d50ed1a
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,5 @@
include(Compiler/GHS)
set(CMAKE_C_VERBOSE_FLAG "-v") set(CMAKE_C_VERBOSE_FLAG "-v")
set(CMAKE_C_FLAGS_INIT "") 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 set(CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT
"-ldebug ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}") "-ldebug ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}")
set(CMAKE_EXECUTABLE_SUFFIX ".as")
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_C_GHS_KERNEL_FLAGS_DEBUG "${CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT}" 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.") CACHE STRING "Kernel flags used by the compiler during debug builds.")

View File

@ -1,3 +1,5 @@
include(Compiler/GHS)
set(CMAKE_CXX_VERBOSE_FLAG "-v") set(CMAKE_CXX_VERBOSE_FLAG "-v")
set(CMAKE_CXX_FLAGS_INIT "") 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 set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT
"-ldebug ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}") "-ldebug ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}")
set(CMAKE_EXECUTABLE_SUFFIX ".as")
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG set (CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG
"${CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT}" "${CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT}"

View File

@ -0,0 +1,6 @@
if(__COMPILER_GHS)
return()
endif()
set(__COMPILER_GHS 1)
set(CMAKE_EXECUTABLE_SUFFIX ".as")