]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Tue, 12 Nov 2013 09:03:23 +0000 (09:03 +0000)
committermpa <mpa@opencascade.com>
Tue, 12 Nov 2013 09:03:23 +0000 (09:03 +0000)
- edit macro

salome_adm/cmake_files/SalomeMacros.cmake

index 707e04c0ec5791e793ed68348fd4697ed61791cc..df81302fbddbf6cd18860d05105ae95b7a71f802 100755 (executable)
@@ -757,6 +757,14 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
     SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})
   ENDIF()
 
+  IF(WIN32)
+    SET(_ext "bat")
+    SET(_call_cmd "call")
+  ELSE()
+    SET(_ext "sh")
+    SET(_call_cmd ".")
+  ENDIF()
+  
   SET(_env)
   FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
     FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
@@ -764,13 +772,9 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
         IF(${_item} STREQUAL "LD_LIBRARY_PATH")
           SET(_item PATH)
         ENDIF()
-        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")
-        SET(_ext "bat")
-        SET(_call_cmd "call")
+        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")        
       ELSE(WIN32)
         SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
-        SET(_ext "sh")
-        SET(_call_cmd ".")
       ENDIF(WIN32)
     ENDFOREACH()
   ENDFOREACH()