From deaa1db8521f155ab990a79cc52675ee82a76608 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Sep 2018 17:31:40 -0500 Subject: HDFFV-10332 Use pre-generated files --- release_docs/RELEASE.txt | 7 ++- src/CMakeLists.txt | 109 ++++++++++++++++++++++++++++------------------- 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c8c7d5c..6aa7a70 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -84,7 +84,12 @@ New Features Library: -------- - - + - Allow pre-generated H5Tinit.c and H5make_libsettings.c to be used. + + Rather than always running H5detect and generating H5Tinit.c and + H5make_libsettings.c, supply a location for those files. + + (ADB - 2018/09/18, HDFFV-10332) Parallel Library: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ee06f06..1cd0a10 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -853,38 +853,50 @@ endif () # Setup the H5detect utility which generates H5Tinit with platform # specific type checks inside #----------------------------------------------------------------------------- -add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -target_include_directories(H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") -target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) -TARGET_C_PROPERTIES (H5detect STATIC) -target_link_libraries (H5detect - PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> - INTERFACE $<$:"-O0"> -) +option (HDF5_USE_PREGEN "Use pre-generated Files" OFF) +if (HDF5_USE_PREGEN) + set (HDF5_GENERATED_SOURCE_DIR ${HDF5_USE_PREGEN_DIR}) +else () + set (HDF5_GENERATED_SOURCE_DIR ${HDF5_BINARY_DIR}) +endif () -add_custom_command ( - OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c - COMMAND $ - ARGS ${HDF5_BINARY_DIR}/H5Tinit.c - DEPENDS H5detect -) +if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) + add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) + target_include_directories(H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) + TARGET_C_PROPERTIES (H5detect STATIC) + target_link_libraries (H5detect + PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> + INTERFACE $<$:"-O0"> + ) -add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) -target_include_directories(H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") -target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) -TARGET_C_PROPERTIES (H5make_libsettings STATIC) -target_link_libraries (H5make_libsettings - PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> - INTERFACE $<$:"-O0"> -) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + COMMAND $ + ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + DEPENDS H5detect + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + ) +endif () -add_custom_command ( - OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c - COMMAND $ - ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_BINARY_DIR} -) +if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c) + add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) + target_include_directories(H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) + TARGET_C_PROPERTIES (H5make_libsettings STATIC) + target_link_libraries (H5make_libsettings + PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> + INTERFACE $<$:"-O0"> + ) + + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c + COMMAND $ + ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c + DEPENDS H5make_libsettings + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + ) +endif () ## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z" #all_packages="AC,B2,CX,D,F,HL,I,O,S,ST,T,Z" @@ -893,7 +905,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) #----------------------------------------------------------------------------- # Add H5Tinit source to build - generated by H5detect/CMake at configure time #----------------------------------------------------------------------------- -set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) +set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c) 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} @@ -922,21 +934,28 @@ set (install_targets ${HDF5_LIB_TARGET}) if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") - add_custom_command ( - OUTPUT ${HDF5_BINARY_DIR}/shared/H5Tinit.c - COMMAND $ - ARGS ${HDF5_BINARY_DIR}/shared/H5Tinit.c - DEPENDS H5detect - WORKING_DIRECTORY ${HDF5_BINARY_DIR}/shared - ) - add_custom_command ( - OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c - COMMAND $ - ARGS ${HDF5_BINARY_DIR}/shared/H5lib_settings.c - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_BINARY_DIR} - ) - set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) + if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + COMMAND $ + ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + DEPENDS H5detect + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}/shared + ) + endif () + + if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c + COMMAND $ + ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c + DEPENDS H5make_libsettings + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + ) + endif () + + set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) + 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};$<$:${MPI_C_INCLUDE_DIRS}>" -- cgit v0.12 From d2806d4875074efd03431385922480e27e32a060 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 19 Sep 2018 08:52:13 -0500 Subject: HDFFV-10332 Adjust checks and generation of files --- src/CMakeLists.txt | 73 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1cd0a10..e90e580 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -860,6 +860,10 @@ else () set (HDF5_GENERATED_SOURCE_DIR ${HDF5_BINARY_DIR}) endif () +if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") +endif () + if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) target_include_directories(H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") @@ -877,6 +881,30 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) DEPENDS H5detect WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} ) + if (BUILD_SHARED_LIBS) + if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + COMMAND $ + ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + DEPENDS H5detect + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}/shared + ) + else () + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) + endif () + endif () +else () + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) + if (BUILD_SHARED_LIBS) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" + DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ) + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) + endif () endif () if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c) @@ -896,6 +924,30 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c) DEPENDS H5make_libsettings WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} ) + if (BUILD_SHARED_LIBS) + if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c + COMMAND $ + ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c + DEPENDS H5make_libsettings + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + ) + else () + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) + endif () + endif () +else () + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE) + if (BUILD_SHARED_LIBS) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c" + DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c + ) + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) + endif () endif () ## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z" @@ -933,27 +985,6 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries) set (install_targets ${HDF5_LIB_TARGET}) if (BUILD_SHARED_LIBS) - file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") - if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c) - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c - COMMAND $ - ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c - DEPENDS H5detect - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}/shared - ) - endif () - - if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c - COMMAND $ - ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - ) - endif () - set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) -- cgit v0.12 From 2862c93a2bd863a44ffe4e9664905090bc58f9ed Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 20 Sep 2018 10:15:12 -0500 Subject: Correct $withval usage in configure --- configure.ac | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index cedfcfd..469c53d 100644 --- a/configure.ac +++ b/configure.ac @@ -1261,8 +1261,8 @@ AC_ARG_WITH([dmalloc], [Use dmalloc memory debugging aid [default=no]])],, [withval=no]) -case $withval in - yes) +case "X-$withval" in + X-yes) HAVE_DMALLOC="yes" AC_CHECK_HEADERS([dmalloc.h],, [unset HAVE_DMALLOC]) if test "x$HAVE_DMALLOC" = "xyes"; then @@ -1272,7 +1272,7 @@ case $withval in AC_MSG_ERROR([couldn't find dmalloc library]) fi ;; - no) + X-|X-no|X-none) HAVE_DMALLOC="no" AC_MSG_CHECKING([for dmalloc library]) AC_MSG_RESULT([suppressed]) @@ -1340,8 +1340,8 @@ AC_ARG_WITH([zlib], filter [default=yes]])],, [withval=yes]) -case $withval in - yes) +case "X-$withval" in + X-yes) HAVE_ZLIB="yes" AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"], [unset HAVE_ZLIB]) if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then @@ -1355,7 +1355,7 @@ case $withval in AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"]) fi ;; - no) + X-|X-no|X-none) HAVE_ZLIB="no" AC_MSG_CHECKING([for zlib]) AC_MSG_RESULT([suppressed]) @@ -1434,8 +1434,8 @@ AC_ARG_WITH([szlib], filter [default=no]])],, [withval=no]) -case $withval in - yes) +case "X-$withval" in + X-yes) HAVE_SZLIB="yes" AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB]) if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then @@ -1445,7 +1445,7 @@ case $withval in AC_MSG_ERROR([couldn't find szlib library]) fi ;; - no) + X-|X-no|X-none) HAVE_SZLIB="no" AC_MSG_CHECKING([for szlib]) AC_MSG_RESULT([suppressed]) -- cgit v0.12 From a8f46df2c29f73947d1ab342d53c5f1e42fbbefe Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Sep 2018 15:29:26 -0500 Subject: Remove libsettings from pregenerated block --- src/CMakeLists.txt | 67 ++++++++++++++++++++++-------------------------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e90e580..7bf976d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -907,46 +907,33 @@ else () endif () endif () -if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c) - add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) - target_include_directories(H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") - target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) - TARGET_C_PROPERTIES (H5make_libsettings STATIC) - target_link_libraries (H5make_libsettings - PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> - INTERFACE $<$:"-O0"> - ) - - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c - COMMAND $ - ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - ) - if (BUILD_SHARED_LIBS) - if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c - COMMAND $ - ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - ) - else () - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) - endif () - endif () -else () - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE) - if (BUILD_SHARED_LIBS) +add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) +target_include_directories(H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) +TARGET_C_PROPERTIES (H5make_libsettings STATIC) +target_link_libraries (H5make_libsettings + PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> + INTERFACE $<$:"-O0"> +) + +add_custom_command ( + OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c + COMMAND $ + ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c + DEPENDS H5make_libsettings + WORKING_DIRECTORY ${HDF5_BINARY_DIR} +) +if (BUILD_SHARED_LIBS) + if (NOT EXISTS ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c" - DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c + OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c + COMMAND $ + ARGS ${HDF5_BINARY_DIR}/shared/H5lib_settings.c + DEPENDS H5make_libsettings + WORKING_DIRECTORY ${HDF5_BINARY_DIR} ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) + else () + set_source_files_properties (${HDF5_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) endif () endif () @@ -957,7 +944,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) #----------------------------------------------------------------------------- # Add H5Tinit source to build - generated by H5detect/CMake at configure time #----------------------------------------------------------------------------- -set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_GENERATED_SOURCE_DIR}/H5lib_settings.c) +set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) 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} @@ -985,7 +972,7 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries) set (install_targets ${HDF5_LIB_TARGET}) if (BUILD_SHARED_LIBS) - set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_GENERATED_SOURCE_DIR}/shared/H5lib_settings.c) + set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) 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} -- cgit v0.12 From 9045cf049f74e017e20ed366d9a811a7902cf8ff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Sep 2018 15:31:39 -0500 Subject: Remove extra unneeded --- src/CMakeLists.txt | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bf976d..d16adf8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -924,17 +924,13 @@ add_custom_command ( WORKING_DIRECTORY ${HDF5_BINARY_DIR} ) if (BUILD_SHARED_LIBS) - if (NOT EXISTS ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) - add_custom_command ( - OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c - COMMAND $ - ARGS ${HDF5_BINARY_DIR}/shared/H5lib_settings.c - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_BINARY_DIR} - ) - else () - set_source_files_properties (${HDF5_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) - endif () + add_custom_command ( + OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c + COMMAND $ + ARGS ${HDF5_BINARY_DIR}/shared/H5lib_settings.c + DEPENDS H5make_libsettings + WORKING_DIRECTORY ${HDF5_BINARY_DIR} + ) endif () ## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z" -- cgit v0.12