This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opengm: Added a patch to let us skip the sphinx docs build with a cma…
…ke switch.
- Loading branch information
1 parent
4d9ddf1
commit 6f444ef
Showing
2 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- src/interfaces/python/CMakeLists.txt 2014-05-28 16:03:43.000000000 -0400 | ||
+++ src/interfaces/python/CMakeLists.txt2 2014-05-28 16:03:38.000000000 -0400 | ||
@@ -16,47 +16,50 @@ | ||
|
||
message(STATUS ${OPENGM_PYTHON_BUILD_MODULE_DIR}) | ||
|
||
-find_package(SPHINX) | ||
-if(SPHINX_FOUND) | ||
- message(STATUS "FOUND_SPHINX") | ||
+set( BUILD_PYTHON_DOCS 0 CACHE BOOL "Build the Python documentation with Sphinx" ) | ||
|
||
- if(NOT DEFINED SPHINX_THEME) | ||
- set(SPHINX_THEME default) | ||
+if(BUILD_PYTHON_DOCS) | ||
+ find_package(SPHINX) | ||
+ if(SPHINX_FOUND) | ||
+ message(STATUS "FOUND_SPHINX") | ||
+ | ||
+ if(NOT DEFINED SPHINX_THEME) | ||
+ set(SPHINX_THEME default) | ||
+ endif() | ||
+ if(NOT DEFINED SPHINX_THEME_DIR) | ||
+ set(SPHINX_THEME_DIR) | ||
+ endif() | ||
+ # configured documentation tools and intermediate build results | ||
+ set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") | ||
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_build) | ||
+ # Sphinx cache with pickled ReST documents | ||
+ set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/_doctrees") | ||
+ # HTML output directory | ||
+ set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/html") | ||
+ configure_file( | ||
+ "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py.in" | ||
+ #"${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py" | ||
+ "${BINARY_BUILD_DIR}/conf.py" | ||
+ @ONLY) | ||
+ add_custom_target(python-doc ALL | ||
+ ${SPHINX_EXECUTABLE} | ||
+ -q -b html | ||
+ #-c "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" | ||
+ -c "${BINARY_BUILD_DIR}" | ||
+ -d "${SPHINX_CACHE_DIR}" | ||
+ "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" | ||
+ "${SPHINX_HTML_DIR}" | ||
+ COMMENT "Building HTML documentation with Sphinx") | ||
+ add_dependencies(python-doc _opengmcore ) | ||
+ add_dependencies(python-doc _inference ) | ||
+ add_dependencies(python-doc _hdf5 ) | ||
+ | ||
+ else() | ||
+ message(STATUS "CANNOT Building HTML documentation with Sphinx , did not find Sphinx") | ||
endif() | ||
- if(NOT DEFINED SPHINX_THEME_DIR) | ||
- set(SPHINX_THEME_DIR) | ||
- endif() | ||
- # configured documentation tools and intermediate build results | ||
- set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") | ||
- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_build) | ||
- # Sphinx cache with pickled ReST documents | ||
- set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/_doctrees") | ||
- # HTML output directory | ||
- set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/html") | ||
- configure_file( | ||
- "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py.in" | ||
- #"${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py" | ||
- "${BINARY_BUILD_DIR}/conf.py" | ||
- @ONLY) | ||
- add_custom_target(python-doc ALL | ||
- ${SPHINX_EXECUTABLE} | ||
- -q -b html | ||
- #-c "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" | ||
- -c "${BINARY_BUILD_DIR}" | ||
- -d "${SPHINX_CACHE_DIR}" | ||
- "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" | ||
- "${SPHINX_HTML_DIR}" | ||
- COMMENT "Building HTML documentation with Sphinx") | ||
- add_dependencies(python-doc _opengmcore ) | ||
- add_dependencies(python-doc _inference ) | ||
- add_dependencies(python-doc _hdf5 ) | ||
- | ||
-else() | ||
- message(STATUS "CANNOT Building HTML documentation with Sphinx , did not find Sphinx") | ||
endif() | ||
|
||
|
||
|
||
|
||
|
||
- |