From 92720327dbaa07eef332bd80442ca9f66fe9dcca Mon Sep 17 00:00:00 2001 From: abn Date: Wed, 7 Oct 2015 13:19:35 +0200 Subject: [PATCH] Finalized new doc organisation. Now about to fill some gaps. --- doc2/user/doxygen/CMakeLists.txt | 14 +++++++++++++- .../medloader/{intro.dox => intro-medloader.dox} | 4 ++-- .../doxfiles/reference/medloader/medloader.dox | 2 +- doc2/user/tutorial/CMakeLists.txt | 3 ++- 4 files changed, 18 insertions(+), 5 deletions(-) rename doc2/user/doxygen/doxfiles/reference/medloader/{intro.dox => intro-medloader.dox} (97%) diff --git a/doc2/user/doxygen/CMakeLists.txt b/doc2/user/doxygen/CMakeLists.txt index 558964b94..2b5209f9c 100644 --- a/doc2/user/doxygen/CMakeLists.txt +++ b/doc2/user/doxygen/CMakeLists.txt @@ -22,6 +22,8 @@ SALOME_CONFIGURE_FILE(static/header.html.in static/header.html) IF(SALOME_MED_ENABLE_PYTHON) + INCLUDE(doxy2swig/doxy2swig.cmake) + FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/tmp/medcouplingexamples.in" input) FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/BuildPyExamplesFromCPP.py" pythondocexamplesgenerator) FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" output) @@ -62,6 +64,13 @@ IF(SALOME_MED_ENABLE_PYTHON) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) + # Create dummy target gathering the generation of all .i files: + ADD_CUSTOM_TARGET(swig_ready) + ADD_DEPENDENCIES(swig_ready usr_docs) + + SALOME_MED_SWIG_DOCSTRING_CONFIGURE(usr_docs swig_ready MEDCoupling) + SALOME_MED_SWIG_DOCSTRING_CONFIGURE(usr_docs swig_ready MEDLoader) + SET(doxyfile_med_user ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_med_user) FILE(STRINGS ${doxyfile_med_user} enabled_sections REGEX "ENABLED_SECTIONS") IF(enabled_sections) @@ -73,6 +82,9 @@ IF(SALOME_MED_ENABLE_PYTHON) "#Temporary variable to enable python documentation sections\nENABLED_SECTIONS = ENABLE_EXAMPLES") ENDIF() + # Swig generation to have docstrings correctly populated: + INCLUDE(doxy2swig/doxy2swig.cmake) + ELSE() ADD_CUSTOM_TARGET(usr_docs ALL COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile_med_user @@ -81,7 +93,7 @@ ELSE() ) ENDIF() -INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)") +#INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)") INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc_ref_user/html/ DESTINATION ${SALOME_INSTALL_DOC}/gui/MED) INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/MED) diff --git a/doc2/user/doxygen/doxfiles/reference/medloader/intro.dox b/doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox similarity index 97% rename from doc2/user/doxygen/doxfiles/reference/medloader/intro.dox rename to doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox index 7e47cdbf6..d343ad833 100644 --- a/doc2/user/doxygen/doxfiles/reference/medloader/intro.dox +++ b/doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox @@ -1,5 +1,5 @@ /*! -\page medloader-intro Overview +\page intro-medloader Overview [TOC] @@ -14,7 +14,7 @@ As a MED file can combine several \ref medcoupling aspects in one (for example m MED file on different mesh dimension with families and groups) the API of \ref medloader "MEDLoader" is much more rich than simply read and write. -\ref MEDCouplingMeshesPage "MEDCoupling mesh" is \b not as rich as a MED file mesh, and a \ref MEDCouplingFieldsPage "MEDCoupling field" is \b not as rich as a MED file field. +\ref meshes "MEDCoupling mesh" is \b not as rich as a MED file mesh, and a \ref MEDCouplingFieldsPage "MEDCoupling field" is \b not as rich as a MED file field. But it is possible to emulate with a very good fidelity a MED file mesh and a MED file field with a collection of MEDCoupling instances for each. \section MEDLoader2Approaches Two approaches diff --git a/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox b/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox index 12062ee43..3b4442a34 100644 --- a/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox +++ b/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox @@ -1,7 +1,7 @@ /*! \page medloader MEDLoader: Writing, reading MED files -- \subpage medloader-intro +- \subpage intro-medloader - \subpage MEDLoaderBasicAPIPage - \subpage MEDLoaderAdvancedAPIPage diff --git a/doc2/user/tutorial/CMakeLists.txt b/doc2/user/tutorial/CMakeLists.txt index 9c5805e42..5cc2cb60a 100644 --- a/doc2/user/tutorial/CMakeLists.txt +++ b/doc2/user/tutorial/CMakeLists.txt @@ -19,7 +19,8 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) -SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} html) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} html) +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(tutorial_doc COMMAND ${_cmd}) ADD_DEPENDENCIES(usr_docs tutorial_doc) -- 2.39.2