diff options
author | Brad King <brad.king@kitware.com> | 2019-04-08 11:43:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-08 11:45:13 (GMT) |
commit | c756fbce9ba94e2d7f1b787d595df24dbe99c9c1 (patch) | |
tree | c33d897d80d3623677d90f40d9cba5ae9474b96f /Modules/Platform | |
parent | 99ce35ab9cbdac4a7cc626590f5e86c36ae29070 (diff) | |
parent | a1e6b414b9ade99a8f4e6bbe9bbff43ee1a05e88 (diff) | |
download | CMake-c756fbce9ba94e2d7f1b787d595df24dbe99c9c1.zip CMake-c756fbce9ba94e2d7f1b787d595df24dbe99c9c1.tar.gz CMake-c756fbce9ba94e2d7f1b787d595df24dbe99c9c1.tar.bz2 |
Merge topic 'ghs_os_dir'
a1e6b414b9 GHS: Update GHS_BSP_NAME processing
266dadf868 GHS: Print status message regarding GHS_OS_DIR
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3123
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/GHS-MULTI-Determine.cmake (renamed from Modules/Platform/GHS-MULTI-Initialize.cmake) | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Modules/Platform/GHS-MULTI-Initialize.cmake b/Modules/Platform/GHS-MULTI-Determine.cmake index db65d14..349d906 100644 --- a/Modules/Platform/GHS-MULTI-Initialize.cmake +++ b/Modules/Platform/GHS-MULTI-Determine.cmake @@ -13,39 +13,40 @@ 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_OPTION "-os_dir " CACHE STRING "GHS compiler OS option") +mark_as_advanced(GHS_OS_DIR_OPTION) #set GHS_OS_DIR if not set by user -if ( NOT GHS_OS_DIR ) - if (EXISTS ${GHS_OS_ROOT}) +if(NOT GHS_OS_DIR) + if(EXISTS ${GHS_OS_ROOT}) #get all directories in root directory FILE(GLOB GHS_CANDIDATE_OS_DIRS LIST_DIRECTORIES true RELATIVE ${GHS_OS_ROOT} ${GHS_OS_ROOT}/*) FILE(GLOB GHS_CANDIDATE_OS_FILES LIST_DIRECTORIES false RELATIVE ${GHS_OS_ROOT} ${GHS_OS_ROOT}/*) - if ( GHS_CANDIDATE_OS_FILES ) + if(GHS_CANDIDATE_OS_FILES) list(REMOVE_ITEM GHS_CANDIDATE_OS_DIRS ${GHS_CANDIDATE_OS_FILES}) endif () #filter based on platform name - if (GHS_TARGET_PLATFORM MATCHES "integrity") - list(FILTER GHS_CANDIDATE_OS_DIRS INCLUDE REGEX "int[0-9][0-9][0-9][0-9a-z].*") + 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 () + endif() - if (GHS_CANDIDATE_OS_DIRS) + if(GHS_CANDIDATE_OS_DIRS) list(SORT GHS_CANDIDATE_OS_DIRS) list(GET GHS_CANDIDATE_OS_DIRS -1 GHS_OS_DIR) string(CONCAT GHS_OS_DIR ${GHS_OS_ROOT} "/" ${GHS_OS_DIR}) endif() + #update cache with new value set(GHS_OS_DIR "${GHS_OS_DIR}" CACHE PATH "GHS platform OS directory" FORCE) - endif () -endif () + endif() +endif() set(GHS_BSP_NAME "IGNORE" CACHE STRING "BSP name") |