From: vsr Date: Tue, 12 Apr 2022 16:40:56 +0000 (+0300) Subject: bos #29682 Directories may contain spaces and parentheses X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b3ba3462a58c12b071bf21e45c953e2cfe553ec;p=tools%2Fconfiguration.git bos #29682 Directories may contain spaces and parentheses --- diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index ed1ca49..a915cac 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -753,32 +753,32 @@ ENDMACRO(SALOME_ACCUMULATE_HEADERS) 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()