diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index bb244764de2..02f8dc35058 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -141,6 +141,10 @@ install ( #----------------------------------------------------------------------------- option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) if (HDF5_PACK_EXAMPLES) + if (DEFINED CMAKE_TOOLCHAIN_FILE) + get_filename_component(TOOLCHAIN ${CMAKE_TOOLCHAIN_FILE} NAME) + set(CTEST_TOOLCHAIN_FILE "\${CTEST_SOURCE_DIRECTORY}/config/toolchain/${TOOLCHAIN}") + endif () configure_file ( ${HDF_RESOURCES_DIR}/examples/HDF5_Examples.cmake.in ${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY @@ -295,10 +299,10 @@ endif () if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGE_VENDOR "HDF_Group") set (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") - if (CDASH_LOCAL) - set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") - else () + if (NOT WIN32 OR HDF5_VERS_SUBRELEASE MATCHES "^[0-9]+$") set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}") + else () + set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") endif () set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 9332de0cb70..741f56a2f7f 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -22,20 +22,12 @@ set (CTEST_DROP_METHOD "https") if (CTEST_DROP_SITE_INIT) set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}") else () - if (CDASH_LOCAL) - set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org") - else () - set (CTEST_DROP_SITE "cdash.hdfgroup.org") - endif () + set (CTEST_DROP_SITE "cdash.hdfgroup.org") endif () if (CTEST_DROP_LOCATION_INIT) set (CTEST_DROP_LOCATION "${CTEST_DROP_LOCATION_INIT}") else () - if (CDASH_LOCAL) - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114") - else () - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114") - endif () + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114") endif () set (CTEST_DROP_SITE_CDASH TRUE) diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 2c0275bc586..b419c805880 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -13,6 +13,6 @@ endif () #----------------------------------------------------------------------------- # Build the CPP unit tests #----------------------------------------------------------------------------- -if (BUILD_TESTING) +if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING) add_subdirectory (test) endif () diff --git a/config/cmake/LIBAEC/CMakeLists.txt b/config/cmake/LIBAEC/CMakeLists.txt index 53950d8942a..9ffb68d28b7 100644 --- a/config/cmake/LIBAEC/CMakeLists.txt +++ b/config/cmake/LIBAEC/CMakeLists.txt @@ -369,10 +369,10 @@ configure_file (${LIBAEC_SOURCE_DIR}/README.md ${LIBAEC_BINARY_DIR}/LIBAEC_READM if (NOT LIBAEC_EXTERNALLY_CONFIGURED) set (CPACK_PACKAGE_VENDOR "HDF_Group") set (CPACK_PACKAGE_NAME "${LIBAEC_PACKAGE_NAME}") - if (CDASH_LOCAL) - set (CPACK_PACKAGE_VERSION "${LIBAEC_PACKAGE_VERSION}") - else () + if (NOT WIN32 OR LIBAEC_VERS_SUBRELEASE MATCHES "^[0-9]+$") set (CPACK_PACKAGE_VERSION "${LIBAEC_PACKAGE_VERSION_STRING}") + else () + set (CPACK_PACKAGE_VERSION "${LIBAEC_PACKAGE_VERSION}") endif () set (CPACK_PACKAGE_VERSION_MAJOR "${LIBAEC_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${LIBAEC_PACKAGE_VERSION_MINOR}") diff --git a/config/cmake/ZLIB/CMakeLists.txt b/config/cmake/ZLIB/CMakeLists.txt index 12411ac9e07..5c06a544ce2 100644 --- a/config/cmake/ZLIB/CMakeLists.txt +++ b/config/cmake/ZLIB/CMakeLists.txt @@ -428,10 +428,10 @@ configure_file (${ZLIB_SOURCE_DIR}/README ${ZLIB_BINARY_DIR}/ZLIB_README @ONLY) if (NOT ZLIB_EXTERNALLY_CONFIGURED) set (CPACK_PACKAGE_VENDOR "HDF_Group") set (CPACK_PACKAGE_NAME "${ZLIB_PACKAGE_NAME}") - if (CDASH_LOCAL) - set (CPACK_PACKAGE_VERSION "${ZLIB_PACKAGE_VERSION}") - else () + if (NOT WIN32 OR ZLIB_VERS_SUBRELEASE MATCHES "^[0-9]+$") set (CPACK_PACKAGE_VERSION "${ZLIB_PACKAGE_VERSION_STRING}") + else () + set (CPACK_PACKAGE_VERSION "${ZLIB_PACKAGE_VERSION}") endif () set (CPACK_PACKAGE_VERSION_MAJOR "${ZLIB_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${ZLIB_PACKAGE_VERSION_MINOR}") diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 159a4e2e56e..c8f5d065ea4 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -73,7 +73,7 @@ set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchConte set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE) set (H5PL_VERS_MAJOR "1" CACHE STRING "Major version of hdf5 package for PLUGIN package" FORCE) set (H5PL_VERS_MINOR "14" CACHE STRING "Minor version of hdf5 package for PLUGIN package" FORCE) -set (H5PL_VERS_RELEASE "3" CACHE STRING "Release version of hdf5 package for PLUGIN package" FORCE) +set (H5PL_VERS_RELEASE "4" CACHE STRING "Release version of hdf5 package for PLUGIN package" FORCE) ############# # bitshuffle diff --git a/config/cmake/examples/HDF5_Examples.cmake.in b/config/cmake/examples/HDF5_Examples.cmake.in index d77c16d49ec..2f3a6491a90 100644 --- a/config/cmake/examples/HDF5_Examples.cmake.in +++ b/config/cmake/examples/HDF5_Examples.cmake.in @@ -29,6 +29,7 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) #INSTALLDIR - HDF5 root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF5Examples +#CTEST_TOOLCHAIN_FILE - name and path in source of toolchain file if(DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 @@ -62,11 +63,6 @@ if(NOT DEFINED CTEST_SOURCE_NAME) set(CTEST_SOURCE_NAME "HDF5Examples") endif() -if(NOT DEFINED HDF_LOCAL) - set(CDASH_LOCAL "NO") -else() - set(CDASH_LOCAL "YES") -endif() if(NOT DEFINED CTEST_SITE) set(CTEST_SITE "local") endif() @@ -100,10 +96,13 @@ else() endif() ### default HDF5_PLUGIN_PATH to where the filter libraries are located set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin") -if(${CDASH_LOCAL}) - set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif() set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") +### use a toolchain file (supported everywhere) #### +if(NOT DEFINED CTEST_TOOLCHAIN_FILE) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=@CTEST_TOOLCHAIN_FILE@") +else() + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=${CTEST_TOOLCHAIN_FILE}") +endif() ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/examples/HDF5_Examples_options.cmake b/config/cmake/examples/HDF5_Examples_options.cmake index cdd49eb13ad..684ec5bf641 100644 --- a/config/cmake/examples/HDF5_Examples_options.cmake +++ b/config/cmake/examples/HDF5_Examples_options.cmake @@ -28,6 +28,19 @@ ### build with shared libraries #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON") +############################################################################################# +#### maximum parallel processor count for build and test #### +#set(MAX_PROC_COUNT 8) + +############################################################################################# +#### alternate toolsets (Windows usually) #### +#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0") + +############################################################################################# +### use a toolchain file (supported everywhere) #### +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/clang.cmake") +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake") + ############################################################################################# #### languages #### ### disable C builds diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index 5267212a09c..d208d65e888 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -26,7 +26,6 @@ ############################################################################################# ### use a toolchain file (supported everywhere) #### - #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake") ############################################################################################# diff --git a/config/sanitizer/README.md b/config/sanitizer/README.md index b33c100ab69..e3141455401 100644 --- a/config/sanitizer/README.md +++ b/config/sanitizer/README.md @@ -305,3 +305,4 @@ file(GLOB_RECURSE CMAKE_FILES cmake_format(TARGET_NAME ${CMAKE_FILES}) ``` + diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index cf9b427b3a6..efaf963c108 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -22,7 +22,7 @@ endif () #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- -if (BUILD_TESTING) +if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING) add_subdirectory (test) if (MPI_Fortran_FOUND) add_subdirectory (testpar) diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index a777b72f540..45a9a22dded 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -26,6 +26,6 @@ if (HDF5_BUILD_EXAMPLES) endif () #-- Build the Unit testing if requested -if (BUILD_TESTING AND HDF5_TEST_SERIAL) +if (HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING AND HDF5_TEST_SERIAL) add_subdirectory (test) endif () diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index ae37ceb9ad8..4965f2c9584 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -49,7 +49,7 @@ endif () #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- -if (BUILD_TESTING) +if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING) add_subdirectory (test) endif () diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 55f2c2a576f..91c57c9cf08 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -7,7 +7,7 @@ add_subdirectory (lib) add_subdirectory (src) #-- Add the tests -if (BUILD_TESTING) +if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING) add_subdirectory (test) # -------------------------------------------------------------------- diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 718f88e1907..b7e4630c07e 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 3.18) project (HDF5_UTILS C) -if (BUILD_TESTING) +if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING) add_subdirectory (test) endif ()