GHS: Add support for GHS Multi Generator in Linux

This commit is contained in:
Naren Manimohan
2019-03-21 17:00:04 +01:00
committed by Brad King
parent 2060a1445c
commit 0404efe786
8 changed files with 52 additions and 17 deletions
+11 -3
View File
@@ -431,10 +431,18 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
)
# Match the compiler location line printed out.
set(ghs_toolpath "${CMAKE_MAKE_PROGRAM}")
string(REPLACE "/gbuild.exe" "/" ghs_toolpath ${ghs_toolpath})
string(REPLACE / "\\\\" ghs_toolpath ${ghs_toolpath})
if(CMAKE_HOST_UNIX)
string(REPLACE "/gbuild" "/" ghs_toolpath ${ghs_toolpath})
else()
string(REPLACE "/gbuild.exe" "/" ghs_toolpath ${ghs_toolpath})
string(REPLACE / "\\\\" ghs_toolpath ${ghs_toolpath})
endif()
if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "(${ghs_toolpath}[^ ]*)")
set(_comp "${CMAKE_MATCH_1}.exe")
if(CMAKE_HOST_UNIX)
set(_comp "${CMAKE_MATCH_1}")
else()
set(_comp "${CMAKE_MATCH_1}.exe")
endif()
if(EXISTS "${_comp}")
file(TO_CMAKE_PATH "${_comp}" _comp)
set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE)
+5 -1
View File
@@ -3,7 +3,11 @@
#Setup Green Hills MULTI specific compilation information
set(GHS_OS_ROOT "C:/ghs" CACHE PATH "GHS platform OS search root directory")
if(CMAKE_HOST_UNIX)
set(GHS_OS_ROOT "/usr/ghs" CACHE PATH "GHS platform OS search root directory")
else()
set(GHS_OS_ROOT "C:/ghs" CACHE PATH "GHS platform OS search root directory")
endif()
mark_as_advanced(GHS_OS_ROOT)
set(GHS_OS_DIR "NOTFOUND" CACHE PATH "GHS platform OS directory")