Skip to content

Commit

Permalink
Merge pull request #1168 from LLNL/bugfix/kweiss/missing-env-vars
Browse files Browse the repository at this point in the history
Ensure several `ENV` variables are not empty before appending them to a list
  • Loading branch information
kennyweiss committed Aug 18, 2023
2 parents a8d4ba0 + a9d7b77 commit aa2c78d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmake/CMakeBasics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,17 @@ endif()
#------------------------------------------------------------------------------

# Build up an AXOM_CONFIG_NAME if not already provided
# Note: some variables might be defined but empty (e.g. CMAKE_BUILD_TYPE in our
# MacOS CI AppleClang configuration) so check before appending them to the list
if(NOT DEFINED AXOM_CONFIG_NAME)
set(_config "")
if(DEFINED ENV{SYS_TYPE})
if(DEFINED ENV{SYS_TYPE} AND NOT "$ENV{SYS_TYPE}" STREQUAL "")
blt_list_append(TO _config ELEMENTS $ENV{SYS_TYPE})
endif()
if(DEFINED ENV{LCSCHEDCLUSTER})
if(DEFINED ENV{LCSCHEDCLUSTER} AND NOT "$ENV{LCSCHEDCLUSTER}" STREQUAL "")
blt_list_append(TO _config ELEMENTS $ENV{LCSCHEDCLUSTER})
endif()
blt_list_append(TO _config ELEMENTS ${CMAKE_CXX_COMPILER_ID})
# Note: the second condition is required since CMAKE_BUILD_TYPE might be empty
# e.g. in our MacOS CI AppleClang configuration
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
blt_list_append(TO _config ELEMENTS ${CMAKE_BUILD_TYPE})
endif()
Expand Down

0 comments on commit aa2c78d

Please sign in to comment.