MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
SET(_is_check ON)
FOREACH(_item ${ARGN})
- IF(${_item} STREQUAL "NOCHECK")
+ IF("${_item}" STREQUAL "NOCHECK")
SET(_is_check OFF)
- ELSEIF(${_item} STREQUAL "CHECK")
+ ELSEIF("${_item}" STREQUAL "CHECK")
SET(_is_check ON)
ELSE()
IF(_is_check)
- IF(NOT IS_DIRECTORY ${_item})
- IF(TARGET ${_item})
- GET_TARGET_PROPERTY(_target_type ${_item} TYPE)
+ IF(NOT IS_DIRECTORY "${_item}")
+ IF(TARGET "${_item}")
+ GET_TARGET_PROPERTY(_target_type "${_item}" TYPE)
IF(NOT ${_target_type} STREQUAL "INTERFACE_LIBRARY")
- GET_TARGET_PROPERTY(_item ${_item} LOCATION)
+ GET_TARGET_PROPERTY(_item "${_item}" LOCATION)
ENDIF()
ENDIF()
- GET_FILENAME_COMPONENT(_item ${_item} PATH)
+ GET_FILENAME_COMPONENT(_item "${_item}" PATH)
ENDIF()
- IF(EXISTS ${_item})
- STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item})
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
+ IF(EXISTS "${_item}")
+ STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find "${_item}")
+ LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} "${_item}" _res)
IF(NOT _usr_find AND _res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+ LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} "${_item}")
ENDIF()
ENDIF()
ELSE(_is_check)
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
+ LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} "${_item}" _res)
IF( _res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+ LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} "${_item}")
ENDIF()
ENDIF(_is_check)
ENDIF()