3
0
mirror of https://github.com/triqs/dft_tools synced 2024-09-20 16:43:54 +02:00

[doc] Run sphinx against source dir, change option BUILD_DOC -> Build_Documentation

This commit is contained in:
Nils Wentzell 2018-03-13 13:23:52 +01:00
parent 73d37c6836
commit a89d558cd6
3 changed files with 20 additions and 8 deletions

View File

@ -58,10 +58,10 @@ endif()
#------------------------ #------------------------
# Documentation # Documentation
#------------------------ #------------------------
option(BUILD_DOC "Build documentation" OFF) option(Build_Documentation "Build documentation" OFF)
if(${BUILD_DOC}) if(${Build_Documentation})
if(NOT ${TRIQS_WITH_DOCUMENTATION}) if(NOT ${TRIQS_WITH_DOCUMENTATION})
message("Error: TRIQS library has not been compiled with its documentation") message("Error: TRIQS library has not been compiled with its documentation")
endif() endif()
add_subdirectory(doc) add_subdirectory(doc)
endif(${BUILD_DOC}) endif()

View File

@ -1,9 +1,6 @@
# generate the conf.py # generate the conf.py
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY)
set(EXT_FOR_DOC "rst png txt css_t conf css js gif jpg py html bib sh")
execute_process(COMMAND cp_rs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${EXT_FOR_DOC})
# --------------------------------- # ---------------------------------
# Top Sphinx target # Top Sphinx target
# --------------------------------- # ---------------------------------
@ -13,7 +10,7 @@ file(GLOB_RECURSE sources *.rst)
# create documentation target # create documentation target
set(sphinx_top ${CMAKE_CURRENT_BINARY_DIR}/html/index.html) set(sphinx_top ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
add_custom_command(OUTPUT ${sphinx_top} DEPENDS ${sources} add_custom_command(OUTPUT ${sphinx_top} DEPENDS ${sources}
COMMAND ${TRIQS_SPHINXBUILD_EXECUTABLE} -c . -j8 -b html ${CMAKE_CURRENT_BINARY_DIR} html) COMMAND ${TRIQS_SPHINXBUILD_EXECUTABLE} -c . -j8 -b html ${CMAKE_CURRENT_SOURCE_DIR} html)
add_custom_target(doc_sphinx ALL DEPENDS ${sphinx_top} ${CMAKE_CURRENT_BINARY_DIR}) add_custom_target(doc_sphinx ALL DEPENDS ${sphinx_top} ${CMAKE_CURRENT_BINARY_DIR})
# --------------------------------- # ---------------------------------

View File

@ -83,7 +83,7 @@ Finally, you will have to change the calls to :program:`python_with_DMFT` to
Version compatibility Version compatibility
--------------------- ---------------------
Be careful that the version of the TRIQS library and of the dft tools must be Be careful that the version of the TRIQS library and of the dft tools must be
compatible (more information on the :ref:`TRIQS website <triqslibs:welcome>`. compatible (more information on the :ref:`TRIQS website <triqslibs:welcome>`.
@ -97,3 +97,18 @@ Checkout the version of the code that you want, for instance::
$ git co 1.2 $ git co 1.2
Then follow the steps 2 to 5 described above to compile the code. Then follow the steps 2 to 5 described above to compile the code.
Custom CMake options
--------------------
Functionality of ``dft_tools`` can be tweaked using extra compile-time options passed to CMake::
cmake -DOPTION1=value1 -DOPTION2=value2 ... ../cthyb.src
+---------------------------------------------------------------+-----------------------------------------------+
| Options | Syntax |
+===============================================================+===============================================+
| Disable testing (not recommended) | -DBuild_Tests=OFF |
+---------------------------------------------------------------+-----------------------------------------------+
| Build the documentation locally | -DBuild_Documentation=ON |
+---------------------------------------------------------------+-----------------------------------------------+