diff options
Diffstat (limited to 'src/cmake/modules')
-rw-r--r-- | src/cmake/modules/GUDHI_doxygen_target.txt | 11 | ||||
-rw-r--r-- | src/cmake/modules/GUDHI_user_version_target.txt | 10 |
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} |