summaryrefslogtreecommitdiff
path: root/src/cython/CMakeLists.txt
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-06-30 16:02:15 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-06-30 16:02:15 +0000
commit8a84688f538eabfacfbbfdbf6cc8e159b1c3b412 (patch)
treee53090f1c6240168cfae190a870375892c8a8be8 /src/cython/CMakeLists.txt
parenta931b662e64cca8d5ab0224c99742f3392b85f64 (diff)
Doc with sphinx
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1369 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ad4fe8083b2659af5f34c71fa02decf63403bce4
Diffstat (limited to 'src/cython/CMakeLists.txt')
-rw-r--r--src/cython/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt
index 27f6b99d..3989d5a1 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -74,6 +74,7 @@ if(PYTHON_PATH AND CYTHON_PATH)
add_custom_target(cythonize_gudhi ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gudhi.so")
+ # Unitary tests are available through py.test
find_program( PYTEST_PATH py.test )
if(PYTEST_PATH)
add_test(
@@ -83,4 +84,25 @@ if(PYTHON_PATH AND CYTHON_PATH)
set_tests_properties(gudhi_cython_py_test PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}")
endif(PYTEST_PATH)
+ # Documentation generation is available through sphinx
+ find_program( SPHINX_PATH sphinx-build )
+ if(SPHINX_PATH)
+ file(COPY doc DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ # Developper version
+ file(GLOB GUDHI_DEV_DOC_IMAGES "${CMAKE_SOURCE_DIR}/src/*/doc/*.png")
+ file(COPY ${GUDHI_DEV_DOC_IMAGES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/source/img")
+ # User version
+ file(GLOB GUDHI_USER_DOC_IMAGES "${CMAKE_SOURCE_DIR}/doc/*/*.png")
+ file(COPY ${GUDHI_USER_DOC_IMAGES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/source/img")
+ if (UNIX)
+ add_custom_target(html
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
+ COMMAND make html)
+ else (UNIX)
+ add_custom_target(html
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
+ COMMAND make.bat html)
+ endif (UNIX)
+ endif(SPHINX_PATH)
+
endif(PYTHON_PATH AND CYTHON_PATH)