summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-09-16 16:44:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-09-16 16:44:04 (GMT)
commit36869656f5d8b87dab7caea7280b1fd1432e10f7 (patch)
tree52d9f668bee0a21141fe83c8f59055264d210ed7 /src/CMakeLists.txt
parent92dc665301127ae5a3e089bd8ecd00ed187a28f9 (diff)
downloadhdf5-36869656f5d8b87dab7caea7280b1fd1432e10f7.zip
hdf5-36869656f5d8b87dab7caea7280b1fd1432e10f7.tar.gz
hdf5-36869656f5d8b87dab7caea7280b1fd1432e10f7.tar.bz2
[svn-r27803] Synch header generation to autogen and create files in source folder.
Tested : Windows which had issues creating the files in both source and build (by-product of perl script).
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt42
1 files changed, 16 insertions, 26 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2aa43f9..ad116a0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -805,34 +805,34 @@ if (HDF5_GENERATE_HEADERS)
find_package (Perl)
if (PERL_FOUND)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5Edefin.h ${CMAKE_CURRENT_BINARY_DIR}/H5Einit.h ${CMAKE_CURRENT_BINARY_DIR}/H5Epubgen.h ${CMAKE_CURRENT_BINARY_DIR}/H5Eterm.h
+ OUTPUT ${HDF5_SRC_DIR}/H5Edefin.h ${HDF5_SRC_DIR}/H5Einit.h ${HDF5_SRC_DIR}/H5Epubgen.h ${HDF5_SRC_DIR}/H5Eterm.h
PRE_BUILD
COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${HDF5_SOURCE_DIR}/src/H5err.txt
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt
+ DEPENDS ${HDF5_SRC_DIR}/H5err.txt
COMMENT " Creating err header"
)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5version.h
+ OUTPUT ${HDF5_SRC_DIR}/H5version.h
PRE_BUILD
COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${HDF5_SOURCE_DIR}/src/H5vers.txt
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SRC_DIR}/H5vers.txt
+ DEPENDS ${HDF5_SRC_DIR}/H5vers.txt
COMMENT " Creating API version macro"
)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5overflow.h
+ OUTPUT ${HDF5_SRC_DIR}/H5overflow.h
PRE_BUILD
COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${HDF5_SOURCE_DIR}/src/H5overflow.txt
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SRC_DIR}/H5overflow.txt
+ DEPENDS ${HDF5_SRC_DIR}/H5overflow.txt
COMMENT " Creating Assignment overflow macro"
)
add_custom_target(run_perl_scripts ALL
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5Edefin.h ${CMAKE_CURRENT_BINARY_DIR}/H5version.h ${CMAKE_CURRENT_BINARY_DIR}/H5overflow.h
+ DEPENDS ${HDF5_SRC_DIR}/H5Edefin.h ${HDF5_SRC_DIR}/H5version.h ${HDF5_SRC_DIR}/H5overflow.h
)
else (PERL_FOUND)
message (STATUS "Cannot generate headers - perl not found")
@@ -845,22 +845,12 @@ endif (HDF5_GENERATE_HEADERS)
set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Tinit.c)
set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5lib_settings.c)
-if (HDF5_GENERATE_HEADERS)
- set (common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/H5Edefin.h)
- set (common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/H5Einit.h)
- set (common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/H5Epubgen.h)
- set (common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/H5Eterm.h)
- set (common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/H5version.h)
- set (common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/H5overflow.h)
- include_directories(${CMAKE_CURRENT_BINARY_DIR})
-else (HDF5_GENERATE_HEADERS)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Edefin.h)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Einit.h)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Epubgen.h)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Eterm.h)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5version.h)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5overflow.h)
-endif (HDF5_GENERATE_HEADERS)
+set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Edefin.h)
+set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Einit.h)
+set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Epubgen.h)
+set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5Eterm.h)
+set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5version.h)
+set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5overflow.h)
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")