summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-11-06 21:07:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-11-06 21:07:37 (GMT)
commit9f299a6eeb91b8bc59196ccbb7067285b23e6085 (patch)
tree55ffe9db13ebc9d64a9b3f81663a21dc7430dcb7
parente6545faa5699aae4d5dca23ed40e3080fa9dc72d (diff)
parent1bd3a2885865f4745209233ea84045a22e6dce9c (diff)
downloadhdf5-9f299a6eeb91b8bc59196ccbb7067285b23e6085.zip
hdf5-9f299a6eeb91b8bc59196ccbb7067285b23e6085.tar.gz
hdf5-9f299a6eeb91b8bc59196ccbb7067285b23e6085.tar.bz2
Merge pull request #1318 in HDFFV/hdf5 from ~BYRN/hdf5_merge_adb:develop to develop
* commit '1bd3a2885865f4745209233ea84045a22e6dce9c': TRILAB-36 add custom target on generated files Fix typo in whitespace area
-rw-r--r--config/cmake/ConversionTests.c2
-rw-r--r--src/CMakeLists.txt4
2 files changed, 5 insertions, 1 deletions
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index 321d879..c2748b2 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -9,7 +9,7 @@
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-+
+
#if defined(__has_attribute)
#if __has_attribute(no_sanitize)
#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a1bab5c..5ba56e5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1034,6 +1034,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
#-----------------------------------------------------------------------------
set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
+add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${gen_SRCS})
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -1056,12 +1057,14 @@ target_link_libraries (${HDF5_LIB_TARGET}
set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
+add_dependencies (${HDF5_LIB_TARGET} gen_${HDF5_LIB_TARGET})
set (install_targets ${HDF5_LIB_TARGET})
if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
+ add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${shared_gen_SRCS})
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -1086,6 +1089,7 @@ if (BUILD_SHARED_LIBS)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB")
set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES FOLDER libraries)
+ add_dependencies (${HDF5_LIBSH_TARGET} gen_${HDF5_LIBSH_TARGET})
set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET})
endif ()