summaryrefslogtreecommitdiff
path: root/src/cmake
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-08 15:30:09 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-08 15:30:09 +0000
commit6fac3d6c1cf3ef3f3d5a0f96854685606fcbf7af (patch)
tree89e136d4d723e62763aff7e580643a8e583294f2 /src/cmake
parent89888dbe0e663b9bc7ad91d3af014b36e538a15f (diff)
Add doxygen target for user and developper version.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/make_user_version@1481 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b76661a6d3e91508ffa21f1e183a5e822f6a92bf
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/modules/GUDHI_doxygen_target.txt11
-rw-r--r--src/cmake/modules/GUDHI_user_version_target.txt10
2 files changed, 20 insertions, 1 deletions
diff --git a/src/cmake/modules/GUDHI_doxygen_target.txt b/src/cmake/modules/GUDHI_doxygen_target.txt
new file mode 100644
index 00000000..d2cb952d
--- /dev/null
+++ b/src/cmake/modules/GUDHI_doxygen_target.txt
@@ -0,0 +1,11 @@
+# add a target to generate API documentation with Doxygen
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+ # configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
+
+ add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${GUDHI_USER_VERSION_DIR}/Doxyfile
+ WORKING_DIRECTORY ${GUDHI_USER_VERSION_DIR}
+ DEPENDS ${GUDHI_USER_VERSION_DIR}/Doxyfile ${GUDHI_DOXYGEN_DEPENDENCY}
+ COMMENT "Generating API documentation with Doxygen in ${GUDHI_USER_VERSION_DIR}/doc/html/" VERBATIM)
+
+endif(DOXYGEN_FOUND)
diff --git a/src/cmake/modules/GUDHI_user_version_target.txt b/src/cmake/modules/GUDHI_user_version_target.txt
index 8d556a72..805f0a83 100644
--- a/src/cmake/modules/GUDHI_user_version_target.txt
+++ b/src/cmake/modules/GUDHI_user_version_target.txt
@@ -6,7 +6,15 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.11)
# Definition of the custom target user_version
add_custom_target(user_version)
- set(GUDHI_USER_VERSION_DIR ${CMAKE_SOURCE_DIR}/${DATE_AND_TIME}_GUDHI_${GUDHI_VERSION})
+ if(DEFINED USER_VERSION_DIR)
+ # set the GUDHI_USER_VERSION_DIR with USER_VERSION_DIR defined by the user
+ set(GUDHI_USER_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/${USER_VERSION_DIR})
+ else()
+ # set the GUDHI_USER_VERSION_DIR with timestamp and Gudhi version number
+ set(GUDHI_USER_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/${DATE_AND_TIME}_GUDHI_${GUDHI_VERSION})
+ endif()
+
+ set(GUDHI_DOXYGEN_DEPENDENCY user_version)
add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
make_directory ${GUDHI_USER_VERSION_DIR}