From a89d558cd6c1e9e81fd40b95bd52bbd0f7c4954b Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Tue, 13 Mar 2018 13:23:52 +0100 Subject: [PATCH] [doc] Run sphinx against source dir, change option BUILD_DOC -> Build_Documentation --- CMakeLists.txt | 6 +++--- doc/CMakeLists.txt | 5 +---- doc/install.rst | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbc0b81a..a0e35fa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,10 +58,10 @@ endif() #------------------------ # Documentation #------------------------ -option(BUILD_DOC "Build documentation" OFF) -if(${BUILD_DOC}) +option(Build_Documentation "Build documentation" OFF) +if(${Build_Documentation}) if(NOT ${TRIQS_WITH_DOCUMENTATION}) message("Error: TRIQS library has not been compiled with its documentation") endif() add_subdirectory(doc) -endif(${BUILD_DOC}) +endif() diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index ef5ee2f3..d7490167 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,9 +1,6 @@ # generate the conf.py 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 # --------------------------------- @@ -13,7 +10,7 @@ file(GLOB_RECURSE sources *.rst) # create documentation target set(sphinx_top ${CMAKE_CURRENT_BINARY_DIR}/html/index.html) 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}) # --------------------------------- diff --git a/doc/install.rst b/doc/install.rst index d8184744..a9dbf263 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -83,7 +83,7 @@ Finally, you will have to change the calls to :program:`python_with_DMFT` to Version compatibility ---------------------- +--------------------- Be careful that the version of the TRIQS library and of the dft tools must be compatible (more information on the :ref:`TRIQS website `. @@ -97,3 +97,18 @@ Checkout the version of the code that you want, for instance:: $ git co 1.2 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 | ++---------------------------------------------------------------+-----------------------------------------------+