summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--doxygen/Doxyfile.in1
-rw-r--r--src/CMakeLists.txt44
-rw-r--r--test/CMakeTests.cmake3
-rw-r--r--test/ShellTests.cmake3
5 files changed, 37 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99dc035..0771ac6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -508,6 +508,14 @@ else ()
endif ()
#-----------------------------------------------------------------------------
+# perl is used in some optional src and tests, check availability
+find_package (Perl)
+if (PERL_FOUND)
+ set (H5_PERL_FOUND YES)
+endif ()
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
option (BUILD_STATIC_EXECS "Build Static Executables" OFF)
diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index 24fc4ba..2395d6c 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -263,6 +263,7 @@ TAB_SIZE = 4
ALIASES =
+@INCLUDE_PATH = @DOXYGEN_INCLUDE_ALIASES_PATH@
@INCLUDE = @DOXYGEN_INCLUDE_ALIASES@
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 06b0c8c..a07122d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -991,8 +991,7 @@ set (H5_PUBLIC_GENERATED_HEADERS
option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON)
if (HDF5_GENERATE_HEADERS)
set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE)
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
execute_process (
COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
)
@@ -1369,34 +1368,43 @@ endif ()
if (DOXYGEN_FOUND)
set (DOXYGEN_PACKAGE ${HDF5_PACKAGE})
set (DOXYGEN_VERSION_STRING ${HDF5_VERSION_STRING})
- set (DOXYGEN_INCLUDE_ALIASES ${HDF5_DOXYGEN_DIR}/aliases)
+ set (DOXYGEN_INCLUDE_ALIASES_PATH ${HDF5_DOXYGEN_DIR})
+ set (DOXYGEN_INCLUDE_ALIASES aliases)
+ set (DOXYGEN_VERBATIM_VARS DOXYGEN_INCLUDE_ALIASES)
set (DOXYGEN_PROJECT_LOGO ${HDF5_DOXYGEN_DIR}/img/HDFG-logo.png)
set (DOXYGEN_PROJECT_BRIEF "C-API Reference")
- set (DOXYGEN_INPUT_DIRECTORY ${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}/shared)
+ set (DOXYGEN_INPUT_DIRECTORY "${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}/shared")
set (DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES)
set (DOXYGEN_MACRO_EXPANSION YES)
set (DOXYGEN_OUTPUT_DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs)
+# This configure and custom target work together
# Replace variables inside @@ with the current values
- configure_file(${HDF5_DOXYGEN_DIR}/Doxyfile.in Doxyfile @ONLY)
-
- doxygen_add_docs(hdf5lib_doc
-# ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${HDF5_DOXYGEN_DIR}/dox
- ${DOXYGEN_INPUT_DIRECTORY}
- ALL
- WORKING_DIRECTORY ${HDF5_SRC_DIR}
- COMMENT "Generating HDF5 library Source Documentation"
- )
- install(
+ configure_file (${HDF5_DOXYGEN_DIR}/Doxyfile.in ${HDF5_BINARY_DIR}/Doxyfile @ONLY)
+ add_custom_target (hdf5lib_doc ALL
+ COMMAND ${DOXYGEN_EXECUTABLE} ${HDF5_BINARY_DIR}/Doxyfile
+ WORKING_DIRECTORY ${HDF5_SRC_DIR}
+ COMMENT "Generating HDF5 library Source API documentation with Doxygen"
+ VERBATIM )
+# This cmake function requires that the non-default doxyfile settings are provided with set (DOXYGEN_xxx) commands
+# In addition the doxyfile aliases @INCLUDE option is not supported and would need to be provided in a set (DOXYGEN_ALIASES) command.
+# doxygen_add_docs (hdf5lib_doc
+## ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${HDF5_DOXYGEN_DIR}/dox
+# ${DOXYGEN_INPUT_DIRECTORY}
+# ALL
+# WORKING_DIRECTORY ${HDF5_SRC_DIR}
+# COMMENT "Generating HDF5 library Source Documentation"
+# )
+ install (
DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs/html
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT Documents
)
- if(NOT TARGET doxygen)
- add_custom_target(doxygen)
- endif()
+ if (NOT TARGET doxygen)
+ add_custom_target (doxygen)
+ endif ()
- add_dependencies(doxygen hdf5lib_doc)
+ add_dependencies (doxygen hdf5lib_doc)
endif ()
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 242c918..d3e0788 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -889,8 +889,7 @@ if (ENABLE_EXTENDED_TESTS)
#-- Adding test for flushrefresh
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
add_test (
NAME H5TEST-testflushrefresh-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove flushrefresh.h5
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 4676184..4d23de3 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -23,8 +23,7 @@ if (UNIX)
##############################################################################
# configure scripts to test dir
##############################################################################
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
configure_file(${HDF5_TEST_SOURCE_DIR}/testflushrefresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh @ONLY)
endif ()
configure_file(${HDF5_TEST_SOURCE_DIR}/test_usecases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh @ONLY)