summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 408aab7..5b6c11a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -805,27 +805,38 @@ add_custom_command (
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
+set (CMDPERL perl)
add_custom_command (
- TARGET ${HDF5_BINARY_DIR}/H5Edefin.h
+ OUTPUT ${HDF5_BINARY_DIR}/H5Edefin.h
PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt
- COMMENT " Creating err headers"
+ COMMAND ${CMDPERL}
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt
+ DEPENDS ${HDF5_SOURCE_DIR}/src/H5err.txt
+ COMMENT " Creating err header"
)
add_custom_command (
- TARGET ${HDF5_BINARY_DIR}/H5version.h
+ OUTPUT ${HDF5_BINARY_DIR}/H5version.h
PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt
+ COMMAND ${CMDPERL}
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt
+ DEPENDS ${HDF5_SOURCE_DIR}/src/H5vers.txt
COMMENT " Creating API version macro"
)
add_custom_command (
- TARGET ${HDF5_BINARY_DIR}/H5overflow.h
+ OUTPUT ${HDF5_BINARY_DIR}/H5overflow.h
PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt
+ COMMAND ${CMDPERL}
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt
+ DEPENDS ${HDF5_SOURCE_DIR}/src/H5overflow.txt
COMMENT " Creating Assignment overflow macro"
)
+add_custom_target(run_perl_scripts ALL
+ DEPENDS ${HDF5_BINARY_DIR}/H5Edefin.h ${HDF5_BINARY_DIR}/H5version.h ${HDF5_BINARY_DIR}/H5overflow.h
+)
+
#-----------------------------------------------------------------------------
# Add H5Tinit source to build - generated by H5Detect/CMake at configure time
#-----------------------------------------------------------------------------