]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
Build documentation under Windows.
authorrnv <rnv@opencascade.com>
Fri, 16 Aug 2019 15:37:05 +0000 (18:37 +0300)
committerrnv <rnv@opencascade.com>
Fri, 16 Aug 2019 15:37:05 +0000 (18:37 +0300)
cmake/SalomeMacros.cmake
cmake/UseSphinx.cmake

index f6e9388710e42d317fb2d643594524bf49bd3b4e..040add9fe0aebdb08a4bbe91b9cc9703550ce33d 100644 (file)
@@ -799,6 +799,7 @@ ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)
 #   directory.
 #
 MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
+  PARSE_ARGUMENTS(SALOME_GENERATE_ENVIRONMENT_SCRIPT "CONTEXT" "" ${ARGN})
   IF(IS_ABSOLUTE ${script})
     SET(_script ${script})
   ELSE()
@@ -814,13 +815,16 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
   ENDIF()
   
   SET(_env)
+  IF(WIN32 AND SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT)
+    SET(_env "IF ${_env}\"%SET_${SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT}_VARS%\"==\"1\" GOTO END\n")
+  ENDIF()
   FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
     FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
       IF(WIN32)
         IF(${_item} STREQUAL "LD_LIBRARY_PATH")
           SET(_item PATH)
         ENDIF()
-        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")        
+        STRING(REPLACE "/" "\\" _env "${_env}@SET ${_item}=${_val};%${_item}%\n")        
       ELSEIF(APPLE)
         IF(${_item} STREQUAL "LD_LIBRARY_PATH")
           SET(_env "${_env} export DYLD_LIBRARY_PATH=${_val}:\${DYLD_LIBRARY_PATH}\n")
@@ -832,6 +836,11 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
       ENDIF()
     ENDFOREACH()
   ENDFOREACH()
+  IF(WIN32 AND SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT)
+    SET(_env "${_env}@SET SET_${SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT}_VARS=1\n")
+    SET(_env "${_env}:END\n" )
+  ENDIF()
+
   
   SET(_script ${_script}.${_ext})
   FILE(WRITE ${_script} "${_env}")
index b0994172e138cb2f76b0365f5c8660f0b78a07d6..7e952f2c1ed58a2f4f27e2d5f66af3f80dc8a6d9 100644 (file)
@@ -99,6 +99,9 @@ MACRO(ADD_MULTI_LANG_DOCUMENTATION)
   ENDIF()
   
   SET(_env)
+  IF(WIN32)
+    SET(_env "IF ${_env}\"%SET_${MULTI_LANG_TARGET_NAME}_VARS%\"==\"1\" GOTO DO_GENERATION\n")
+  ENDIF()  
   FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
     FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
       IF(WIN32)
@@ -117,6 +120,11 @@ MACRO(ADD_MULTI_LANG_DOCUMENTATION)
       ENDIF()
     ENDFOREACH()
   ENDFOREACH()
+  IF(WIN32)
+    SET(_env "${_env}@SET SET_${MULTI_LANG_TARGET_NAME}_VARS=1\n")
+    SET(_env "${_env}:DO_GENERATION\n" )
+  ENDIF()
+
   
   SET(_script ${CMAKE_CURRENT_BINARY_DIR}/build_doc.${_ext})
   FILE(WRITE ${_script} ${_env}${CMDS})