From 0a9180c0746618d08396d57f3fa5c94aa45e5b65 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Jul 2019 16:08:43 -0500 Subject: HDFFV-10845 update mingw cmake changes --- c++/src/CMakeLists.txt | 5 ++++- config/cmake_ext_mod/ConfigureChecks.cmake | 5 ++--- config/cmake_ext_mod/HDFMacros.cmake | 10 ++++++++-- release_docs/README_HDF5_CMake | 6 +++--- release_docs/RELEASE.txt | 8 ++++---- src/H5win32defs.h | 12 +++++------- testpar/CMakeVFDTests.cmake | 2 +- 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 38c46be..4e668d6 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -112,7 +112,10 @@ if (BUILD_SHARED_LIBS) PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings ) TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED) - target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) + target_link_libraries (${HDF5_CPP_LIBSH_TARGET} + PUBLIC ${HDF5_LIBSH_TARGET} + PRIVATE $<$:-static -static-libgcc -static-libstdc++ -dynamic> + ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED "CXX") set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/cpp) diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index b05fbc8..8b68a9f 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -21,9 +21,6 @@ include (CheckTypeSize) include (CheckVariableExists) include (TestBigEndian) -set (HDF_EXTRA_C_FLAGS) -set (HDF_EXTRA_FLAGS) - #----------------------------------------------------------------------------- # APPLE/Darwin setup #----------------------------------------------------------------------------- @@ -264,6 +261,8 @@ HDF_FUNCTION_TEST (STDC_HEADERS) # The linux-lfs option is deprecated. set (LINUX_LFS 0) +set (HDF_EXTRA_C_FLAGS) +set (HDF_EXTRA_FLAGS) if (NOT WINDOWS) # Might want to check explicitly for Linux and possibly Cygwin # instead of checking for not Solaris or Darwin. diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index d145607..e1b79d8 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -86,7 +86,7 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent) ${targetfilename} DESTINATION ${targetdestination} - CONFIGURATIONS $ + CONFIGURATIONS Debug RelWithDebInfo COMPONENT ${targetcomponent} OPTIONAL ) @@ -101,7 +101,7 @@ macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent) $ DESTINATION ${targetdestination} - CONFIGURATIONS $ + CONFIGURATIONS Debug RelWithDebInfo COMPONENT ${targetcomponent} OPTIONAL ) @@ -128,6 +128,12 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) endif () endif () + set_target_properties (${libtarget} + PROPERTIES + OUTPUT_NAME + ${LIB_RELEASE_NAME} + ) + if (${libtype} MATCHES "STATIC") if (WIN32) set_target_properties (${libtarget} diff --git a/release_docs/README_HDF5_CMake b/release_docs/README_HDF5_CMake index a2e7dce..1b02f0c 100644 --- a/release_docs/README_HDF5_CMake +++ b/release_docs/README_HDF5_CMake @@ -6,16 +6,16 @@ This tar file contains CTestScript.cmake HDF5config.cmake CMake scripts for building HDF5 HDF5options.cmake - hdf5-1.11.4 HDF5 1.11.4 source + hdf5-1.11.6 HDF5 1.11.6 source SZip.tar.gz source for building SZIP ZLib.tar.gz source for building ZLIB For more information about building HDF5 with CMake, see USING_HDF5_CMake.txt in -hdf5-1.11.4/release_docs, or +hdf5-1.11.6/release_docs, or https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake. For more information about building HDF5 with CMake on HPC machines, including -cross compiling on Cray XC40, see README_HPC in hdf5-1.11.4/release_docs. +cross compiling on Cray XC40, see README_HPC in hdf5-1.11.6/release_docs. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 707adce..a64abc8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -50,10 +50,10 @@ New Features ------------- - Windows PDB files are always installed - There are configuration settings for Windows, that may not generate - PDB files. As such the install utility will break because those files - are not found. Add an optional variable that can be set to not install - PDB files. + There are build configuration or flag settings for Windows that may not + generate PDB files. If those files are not generated then the install + utility will fail because those PDB files are not found. An optional + variable, DISABLE_PDB_FILES, was added to not install PDB files. (ADB - 2019/07/17, HDFFV-100424) diff --git a/src/H5win32defs.h b/src/H5win32defs.h index d439379..29533dd 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -69,13 +69,6 @@ typedef __int64 h5_stat_size_t; #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) #define HDwrite(F,M,Z) _write(F,M,Z) -#if (_MSC_VER < 1800) -/* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are - * just pointers into the stack in those CRTs, the usual work-around - * is to just define the operation as a pointer copy. - */ -#define HDva_copy(D,S) ((D) = (S)) -#endif /* MSC_VER < 1800 */ #ifdef H5_HAVE_VISUAL_STUDIO @@ -86,6 +79,11 @@ typedef __int64 h5_stat_size_t; #ifndef H5_HAVE_STRTOULL #define HDstrtoull(S,R,N) _strtoui64(S,R,N) #endif /* H5_HAVE_STRTOULL */ + /* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are + * just pointers into the stack in those CRTs, the usual work-around + * is to just define the operation as a pointer copy. + */ + #define HDva_copy(D,S) ((D) = (S)) #endif /* MSC_VER < 1800 */ /* diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake index 6f974af..1c0f2e8 100644 --- a/testpar/CMakeVFDTests.cmake +++ b/testpar/CMakeVFDTests.cmake @@ -50,7 +50,7 @@ endforeach () add_test ( NAME MPI_TEST_VFD-${vfdname}-${h5_test} COMMAND "${CMAKE_COMMAND}" - -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -- cgit v0.12