#
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()