Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for CMake code and install docs #2623

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ else ()
endif ()

include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${CMAKE_MODULE_PATH})

#-----------------------------------------------------------------------------
# Option to Enable HDFS
Expand Down
10 changes: 5 additions & 5 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,19 @@ tar2cmakezip()
fi

# step 2: add batch file for building CMake on window
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -V -O hdf5.log" > build-VS2013-32.bat; chmod 755 build-VS2013-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -V -O hdf5.log" > build-VS2013-64.bat; chmod 755 build-VS2013-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -V -O hdf5.log" > build-VS2015-32.bat; chmod 755 build-VS2015-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf5.log" > build-VS2015-64.bat; chmod 755 build-VS2015-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2019 -C Release -V -O hdf5.log" > build-VS2019-32.bat; chmod 755 build-VS2019-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201964 -C Release -V -O hdf5.log" > build-VS2019-64.bat; chmod 755 build-VS2019-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2022 -C Release -V -O hdf5.log" > build-VS2022-32.bat; chmod 755 build-VS2022-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS202264 -C Release -V -O hdf5.log" > build-VS2022-64.bat; chmod 755 build-VS2022-64.bat)

# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.2-Source.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
Expand Down Expand Up @@ -297,7 +297,7 @@ tar2cmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.2-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
Expand Down Expand Up @@ -376,7 +376,7 @@ tar2hpccmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.2-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
Expand Down
4 changes: 2 additions & 2 deletions c++/examples/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ foreach (example ${tutr_examples})
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=tutr_cpp_ex_${example}.txt"
#-D "TEST_REFERENCE=cpp_ex_tutr_${example}.out"
-D "TEST_OUTPUT=cpp_ex_${example}.txt"
#-D "TEST_REFERENCE=cpp_ex_${example}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
Expand Down
30 changes: 21 additions & 9 deletions config/cmake/scripts/HDF5config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
#############################################################################################
### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
### BUILD_GENERATOR required [Unix, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564] ###
### BUILD_GENERATOR required [Unix, VS2022, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564] ###
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ###
#############################################################################################

Expand All @@ -23,14 +23,14 @@ cmake_minimum_required (VERSION 3.18)
# BUILD_GENERATOR - The cmake build generator:
# MinGW * MinGW Makefiles
# Unix * Unix Makefiles
# VS2022 * Visual Studio 17 2022
# VS202264 * Visual Studio 17 2022
# VS2019 * Visual Studio 16 2019
# VS201964 * Visual Studio 16 2019
# VS2017 * Visual Studio 15 2017
# VS201764 * Visual Studio 15 2017 Win64
# VS2015 * Visual Studio 14 2015
# VS201564 * Visual Studio 14 2015 Win64
# VS2013 * Visual Studio 12 2013
# VS201364 * Visual Studio 12 2013 Win64
#
# INSTALLDIR - root folder where hdf5 is installed
# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
Expand All @@ -43,9 +43,9 @@ set (CTEST_SOURCE_VERSEXT "")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.13.x root folder
#INSTALLDIR - HDF5-1.15.x root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.13.x
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.15.x
#MODEL - CDash group name
#HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub
#MPI - enable MPI
Expand All @@ -68,7 +68,7 @@ endif ()

# build generator must be defined
if (NOT DEFINED BUILD_GENERATOR)
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564")
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2022, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564")
endif ()

###################################################################
Expand Down Expand Up @@ -105,12 +105,24 @@ endif ()
######### Following describes compiler ############
if (NOT DEFINED HPC)
if (NOT DEFINED BUILD_GENERATOR)
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564")
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2022, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564")
endif ()
if (WIN32 AND NOT MINGW)
set (SITE_OS_NAME "Windows")
set (SITE_OS_VERSION "WIN10")
if (BUILD_GENERATOR STREQUAL "VS201964")
if (BUILD_GENERATOR STREQUAL "VS202264")
set (CTEST_CMAKE_GENERATOR "Visual Studio 17 2022")
set (CMAKE_GENERATOR_ARCHITECTURE "x64")
set (SITE_OS_BITS "64")
set (SITE_COMPILER_NAME "vs2022")
set (SITE_COMPILER_VERSION "17")
elseif (BUILD_GENERATOR STREQUAL "VS2022")
set (CTEST_CMAKE_GENERATOR "Visual Studio 17 2022")
set (CMAKE_GENERATOR_ARCHITECTURE "Win32")
set (SITE_OS_BITS "32")
set (SITE_COMPILER_NAME "vs2022")
set (SITE_COMPILER_VERSION "17")
elseif (BUILD_GENERATOR STREQUAL "VS201964")
set (CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
set (CMAKE_GENERATOR_ARCHITECTURE "x64")
set (SITE_OS_BITS "64")
Expand Down Expand Up @@ -163,7 +175,7 @@ if (NOT DEFINED HPC)
set (SITE_COMPILER_NAME "vs2012")
set (SITE_COMPILER_VERSION "11")
else ()
message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564")
message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2022, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564")
endif ()
## Set the following to unique id your computer ##
set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
Expand Down
2 changes: 1 addition & 1 deletion config/cmake/scripts/HDF5options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")

#### package examples ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-2.0.1-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-2.0.3-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")

#############################################################################################
### enable parallel builds
Expand Down
2 changes: 1 addition & 1 deletion hl/tools/h5watch/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
DEPENDS ${last_test}
FIXTURES_REQUIRED gen_test_watch
)
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}s")
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
endif ()
endmacro ()

Expand Down
2 changes: 1 addition & 1 deletion java/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 3.18)
project (HDF5_JAVA C Java)

set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_DIR}")
set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR}")
find_package (Java)

#-----------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions release_docs/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ CONTENTS


4.3.11. Backward compatibility
The 1.13 version of the HDF5 library can be configured to operate
The 1.15 version of the HDF5 library can be configured to operate
identically to the v1.14 library with the
--with-default-api-version=v114
identically to the v1.12 library with the
--with-default-api-version=v112
configure flag, or identically to the v1.10 library with the
Expand All @@ -427,7 +429,7 @@ CONTENTS
configure flag, or identically to the v1.6 library with the
--with-default-api-version=v16
configure flag. This allows existing code to be compiled with the
v1.13 library without requiring immediate changes to the application
v1.15 library without requiring immediate changes to the application
source code. For additional configuration options and other details,
see "API Compatibility Macros":

Expand Down
Loading