summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-05-20 15:41:01 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-05-20 15:41:01 (GMT)
commite6a3a3cfad1db5b66ed118d34f0e5da231d53413 (patch)
treee2de2cce269439fcf5bce88598440541125c5737 /src
parent5444efe2b126375a363ee7e506d3ac9f8088f236 (diff)
downloadhdf5-e6a3a3cfad1db5b66ed118d34f0e5da231d53413.zip
hdf5-e6a3a3cfad1db5b66ed118d34f0e5da231d53413.tar.gz
hdf5-e6a3a3cfad1db5b66ed118d34f0e5da231d53413.tar.bz2
[svn-r25205] Fix CMP0040 Policy cmake usage
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
#-----------------------------------------------------------------------------