]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Fri, 8 Nov 2013 13:39:13 +0000 (13:39 +0000)
committermpa <mpa@opencascade.com>
Fri, 8 Nov 2013 13:39:13 +0000 (13:39 +0000)
- porting macro SALOME_GENERATE_TESTS_ENVIRONMENT to Window system

salome_adm/cmake_files/SalomeMacros.cmake

index 454728b568d3621205e61fa5ac77092ee485e8fb..707e04c0ec5791e793ed68348fd4697ed61791cc 100755 (executable)
@@ -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()