From: rnv Date: Fri, 11 Oct 2013 08:41:28 +0000 (+0000) Subject: Remove python code to create, copy and remove directories, use cmake -E mode instead. X-Git-Tag: V7_3_0a1~128 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2b0857873f67900958ebacb23eaec692b374b420;p=modules%2Fsmesh.git Remove python code to create, copy and remove directories, use cmake -E mode instead. --- diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt index 91130e103..c9b0ad23a 100644 --- a/doc/salome/gui/SMESH/CMakeLists.txt +++ b/doc/salome/gui/SMESH/CMakeLists.txt @@ -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)