]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Remove python code to create, copy and remove directories, use cmake -E mode instead.
authorrnv <rnv@opencascade.com>
Fri, 11 Oct 2013 08:41:28 +0000 (08:41 +0000)
committerrnv <rnv@opencascade.com>
Fri, 11 Oct 2013 08:41:28 +0000 (08:41 +0000)
doc/salome/gui/SMESH/CMakeLists.txt

index 91130e1036dd7d2028d54f33f088dec3b2da159f..c9b0ad23a1fa847e89898832a0b3e23566d23aa9 100644 (file)
@@ -59,17 +59,18 @@ ENDIF(WINDOWS)
 
 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}")
 
-ADD_CUSTOM_TARGET(usr_docs mkdir -p tmp1 tmp2 
+ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp1
+  COMMAND ${CMAKE_COMMAND} -E make_directory tmp2
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/smeshBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/smesh_algorithm.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/StdMeshersBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py
   COMMAND ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f1} -o tmp1/smeshBuilder.py StdMeshers
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
-  COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; shutil.rmtree(r'''tmp1'''); shutil.rmtree(r'''tmp2''')"
-  COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', ignore=shutil.ignore_patterns('tmp_env.*', '*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH/smeshpy_doc''')"
-#  VERBATIM 
-#  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
+  COMMAND ${CMAKE_COMMAND} -E remove_directory tmp1
+  COMMAND ${CMAKE_COMMAND} -E remove_directory tmp2
+  VERBATIM
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
 
 ADD_DEPENDENCIES(usr_docs html_docs)