GHS: Only print bsp and os directives if specified by user

-- standalone platforms will not build if bsp/os is specified in project file
-- integrity platforms will always print these directives because they are required
-- cleanup -os_dir setting
   allow customization of the actual setting because it is determined by tool-set customization files
   remove variable that was set but never used
-- add message when using default values
This commit is contained in:
Fred Baksik
2019-01-05 11:01:19 -05:00
parent c59eae7ebc
commit a42e40e78d
3 changed files with 51 additions and 36 deletions

View File

@@ -9,6 +9,9 @@ mark_as_advanced(GHS_OS_ROOT)
set(GHS_OS_DIR "NOTFOUND" CACHE PATH "GHS platform OS directory")
mark_as_advanced(GHS_OS_DIR)
set(GHS_OS_DIR_OPTION "-os_dir " CACHE STRING "GHS compiler os option")
mark_as_advanced(GHS_OS_DIR)
#set GHS_OS_DIR if not set by user
if ( NOT GHS_OS_DIR )
if (EXISTS ${GHS_OS_ROOT})
@@ -23,8 +26,11 @@ if ( NOT GHS_OS_DIR )
endif ()
#filter based on platform name
if (GHS_TARGET_PLATFORM STREQUAL "integrity")
if (GHS_TARGET_PLATFORM MATCHES "integrity")
list(FILTER GHS_CANDIDATE_OS_DIRS INCLUDE REGEX "int[0-9][0-9][0-9][0-9a-z].*")
else() #fall-back for standalone
unset(GHS_CANDIDATE_OS_DIRS)
set(GHS_OS_DIR "IGNORE")
endif ()
if (GHS_CANDIDATE_OS_DIRS)