From: mpa Date: Fri, 8 Nov 2013 13:39:13 +0000 (+0000) Subject: CMake: X-Git-Tag: BR_hydro_v_0_3_1~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8fecc15b7a422fb0867a009bba17cbce981690ba;p=modules%2Fkernel.git CMake: - porting macro SALOME_GENERATE_TESTS_ENVIRONMENT to Window system --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 454728b56..707e04c0e 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -798,18 +798,32 @@ ENDMACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT) # MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output) SET(_env) + SET(_WIN_LD_LIBRARY OFF) FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV}) + IF(${_item} STREQUAL "LD_LIBRARY_PATH") + SET(_WIN_LD_LIBRARY ON) + ENDIF() + SET(_env_${_item}) FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}}) IF(WIN32) - SET(_env "${_val};${_env}") + SET(_env_${_item} "${_val};${_env_${_item}}") ELSE() - SET(_env "${_val}:${_env}") + SET(_env_${_item} "${_val}:${_env_${_item}}") ENDIF() ENDFOREACH() - SET(_env " ${_item}=${_env}") - ENDFOREACH() + ENDFOREACH() + + IF(_WIN_LD_LIBRARY AND WIN32) + SET(_env_PATH "${_env_PATH} ${_env_LD_LIBRARY_PATH}") + ENDIF() + + FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV}) + IF(NOT(WIN32 AND ${_item} STREQUAL "LD_LIBRARY_PATH")) + SET(_env "${_item}=${_env_${_item}} ${_env}") + ENDIF() + ENDFOREACH() SET(${output} ${_env}) -ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT) +ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT) ######################################################################### # SALOME_APPEND_LIST_OF_LIST()