diff options
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/HDF5PluginMacros.cmake | 12 | ||||
-rw-r--r-- | config/cmake/HDFCXXCompilerFlags.cmake | 18 | ||||
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 35 | ||||
-rw-r--r-- | config/cmake/cacheinit.cmake | 12 | ||||
-rw-r--r-- | config/cmake/jrunTest.cmake | 6 | ||||
-rw-r--r-- | config/cmake/jvolTest.cmake | 6 | ||||
-rw-r--r-- | config/cmake/scripts/HDF5config.cmake | 2 | ||||
-rw-r--r-- | config/cmake/scripts/HDF5options.cmake | 2 |
8 files changed, 67 insertions, 26 deletions
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index 3cded02..46d3979 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -26,7 +26,7 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) # the hdf5 settings -DHDF5_PACKAGE_NAME:STRING=hdf5 -DHDF5_HDF5_HEADER:STRING=h5pubconf.h - -DHDF5_LINK_LIBS:STRING=$<TARGET_FILE:${HDF5_LIBSH_TARGET}> + -DHDF5_LINK_LIBS:STRING=$<TARGET_LINKER_FILE:${HDF5_LIBSH_TARGET}> -DHDF5_INCLUDE_DIR:PATH=${HDF5_SRC_DIR}|${HDF5_SRC_BINARY_DIR} -DPL_PACKAGE_NAME:STRING=${PLUGIN_PACKAGE_NAME} -DH5PL_CPACK_ENABLE:BOOL=ON @@ -49,8 +49,8 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) -DLZ4_PACKAGE_NAME:STRING=${LZ4_PACKAGE_NAME} -DLZF_TGZ_NAME:STRING=${LZF_TGZ_NAME} -DLZF_PACKAGE_NAME:STRING=${LZF_PACKAGE_NAME} - #-DSZ_TGZ_NAME:STRING=${SZ_TGZ_NAME} - #-DSZ_PACKAGE_NAME:STRING=${SZ_PACKAGE_NAME} + -DSZF_TGZ_NAME:STRING=${SZF_TGZ_NAME} + -DSZF_PACKAGE_NAME:STRING=${SZF_PACKAGE_NAME} -DZFP_TGZ_NAME:STRING=${ZFP_TGZ_NAME} -DZFP_PACKAGE_NAME:STRING=${ZFP_PACKAGE_NAME} ) @@ -78,7 +78,7 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) # the hdf5 settings -DHDF5_PACKAGE_NAME:STRING=hdf5 -DHDF5_HDF5_HEADER:STRING=h5pubconf.h - -DHDF5_LINK_LIBS:STRING=$<TARGET_FILE:${HDF5_LIBSH_TARGET}> + -DHDF5_LINK_LIBS:STRING=$<TARGET_LINKER_FILE:${HDF5_LIBSH_TARGET}> -DHDF5_INCLUDE_DIR:PATH=${HDF5_SRC_DIR}|${HDF5_SRC_BINARY_DIR} -DPL_PACKAGE_NAME:STRING=${PLUGIN_PACKAGE_NAME} -DH5PL_CPACK_ENABLE:BOOL=ON @@ -101,8 +101,8 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) -DLZ4_PACKAGE_NAME:STRING=${LZ4_PACKAGE_NAME} -DLZF_TGZ_NAME:STRING=${LZF_TGZ_NAME} -DLZF_PACKAGE_NAME:STRING=${LZF_PACKAGE_NAME} - #-DSZ_TGZ_NAME:STRING=${SZ_TGZ_NAME} - #-DSZ_PACKAGE_NAME:STRING=${SZ_PACKAGE_NAME} + -DSZF_TGZ_NAME:STRING=${SZF_TGZ_NAME} + -DSZF_PACKAGE_NAME:STRING=${SZF_PACKAGE_NAME} -DZFP_TGZ_NAME:STRING=${ZFP_TGZ_NAME} -DZFP_PACKAGE_NAME:STRING=${ZFP_PACKAGE_NAME} ) diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 7bbebbc..5925989 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -89,7 +89,11 @@ if (NOT MSVC AND NOT MINGW) AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) # add the general CXX flags for g++ compiler versions 4.8 and above. ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general") - ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general") + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general") + else () + ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general") + endif () endif () elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") @@ -152,7 +156,11 @@ if (NOT MSVC AND NOT MINGW) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5") - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5") + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5") + else () + ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5") + endif () endif () # Append more extra warning flags that only gcc 6.x+ know about @@ -177,7 +185,11 @@ if (NOT MSVC AND NOT MINGW) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") - #ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + #if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + #else () + # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8") + #endif () if (HDF5_ENABLE_DEV_WARNINGS) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 31af2f8..5f35e61 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -69,6 +69,18 @@ endif () # break into groups (from the config/gnu-flags file) #----------------------------------------------------------------------------- if (NOT MSVC AND NOT MINGW) + #----------------------------------------------------------------------------- + # Option to allow the user to interpret certain warnings as errors + # + # This should NOT be on by default as it can cause a lot of conflicts with + # new operating systems and compiler versions. Header files that are out of + # our control (MPI, HDFS, etc.) can also raise warnings. + #----------------------------------------------------------------------------- + option (HDF5_ENABLE_WARNINGS_AS_ERRORS "Interpret some warnings as errors" OFF) + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + message (STATUS "...some warnings will be interpreted as errors") + endif () + if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") list (APPEND HDF5_CMAKE_C_FLAGS "-erroff=%none -DBSD_COMP") else () @@ -96,14 +108,22 @@ if (NOT MSVC AND NOT MINGW) # Add general CFlags for GCC versions 4.8 and above if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general") - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general") + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general") + else () + ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general") + endif () endif () # gcc automatically inlines based on the optimization level # this is just a failsafe list (APPEND H5_CFLAGS0 "-finline-functions") elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") + else () + ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general") + endif () elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform") endif () @@ -132,7 +152,6 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... Only needed for gcc 4.X @@ -158,7 +177,11 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 5.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/5") - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") + else () + ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") + endif () endif () # Append more extra warning flags that only gcc 6.x+ know about @@ -179,7 +202,9 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 8.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0) ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") - ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + endif () if (HDF5_ENABLE_DEV_WARNINGS) ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") else () diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 926e230..71c8b4a 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -40,6 +40,8 @@ set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE) +set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++" FORCE) + set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) @@ -155,15 +157,15 @@ set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE) #set (MAFISC_PACKAGE_NAME "mafisc" CACHE STRING "Name of MAFISC package" FORCE) ###### -# sz +# szf ###### -set (SZ_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ from github repository" FORCE) -set (SZ_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (SZF_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ from github repository" FORCE) +set (SZF_GIT_BRANCH "master" CACHE STRING "" FORCE) -set (SZ_TGZ_NAME "sz.tar.gz" CACHE STRING "Use SZ from compressed file" FORCE) +set (SZF_TGZ_NAME "szf.tar.gz" CACHE STRING "Use SZ from compressed file" FORCE) -set (SZ_PACKAGE_NAME "sz" CACHE STRING "Name of SZ package" FORCE) +set (SZF_PACKAGE_NAME "szf" CACHE STRING "Name of SZ package" FORCE) ###### # zfp diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 41570eb..7d59ce5 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -49,7 +49,7 @@ endif () message (STATUS "COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=${LOG_LEVEL} -Djava.library.path=\"${TEST_LIBRARY_DIRECTORY}\" -cp \"${TEST_CLASSPATH}\" ${TEST_ARGS} ${TEST_PROGRAM} ${ARGN}") -if (WIN32 OR MINGW) +if (WIN32) set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") @@ -131,7 +131,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) @@ -202,7 +202,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) diff --git a/config/cmake/jvolTest.cmake b/config/cmake/jvolTest.cmake index 3a3877b..bcd9dbd 100644 --- a/config/cmake/jvolTest.cmake +++ b/config/cmake/jvolTest.cmake @@ -54,7 +54,7 @@ message (STATUS "USING ${TEST_VOL} ON COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.sl set (ENV{HDF5_VOL_CONNECTOR} "${TEST_VOL}") -if (WIN32 OR MINGW) +if (WIN32) set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") @@ -136,7 +136,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) list(LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) @@ -207,7 +207,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) list(LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 3a8d5b7..61c535e 100644 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -204,7 +204,7 @@ endif () #set (LOCAL_NO_PACKAGE "TRUE") ##### Following controls source update ##### #set (LOCAL_UPDATE "TRUE") -set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git") +set (REPOSITORY_URL "https://github.com/HDFGroup/hdf5.git") set (REPOSITORY_BRANCH "develop") #uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index f132234..33ec74b 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -57,7 +57,9 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT") ### ext libs on system #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO") +#set(ENV{ZLIB_ROOT} "some_location") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include") +#set(ENV{SZIP_ROOT} "some_location") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include") ### disable using ext zlib |