From 72915b10683cd7a6f1345f4e438722f12dcb1973 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 24 Mar 2023 20:16:40 -0400 Subject: FindHDF5: Fix compiler wrapper checks with spaces in path Some HDF5 compiler wrappers do not support source file paths that contain spaces. Pass source files to them using a file name in the current working directory to avoid spaces. --- Modules/FindHDF5.cmake | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 96c71c2..c1e6a64 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -219,7 +219,7 @@ endif() function(_HDF5_test_regular_compiler_C success version is_parallel) if(NOT ${success} OR NOT EXISTS ${_HDF5_TEST_DIR}/compiler_has_h5_c) - file(WRITE "${_HDF5_TEST_SRC}" + file(WRITE "${_HDF5_TEST_DIR}/${_HDF5_TEST_SRC}" "#include \n" "const char* info_ver = \"INFO\" \":\" H5_VERSION;\n" "#ifdef H5_HAVE_PARALLEL\n" @@ -235,7 +235,7 @@ function(_HDF5_test_regular_compiler_C success version is_parallel) " fid = H5Fcreate(\"foo.h5\",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);\n" " return 0;\n" "}") - try_compile(${success} SOURCES "${_HDF5_TEST_SRC}" + try_compile(${success} SOURCES "${_HDF5_TEST_DIR}/${_HDF5_TEST_SRC}" COPY_FILE ${_HDF5_TEST_DIR}/compiler_has_h5_c ) endif() @@ -263,7 +263,7 @@ endfunction() function(_HDF5_test_regular_compiler_CXX success version is_parallel) if(NOT ${success} OR NOT EXISTS ${_HDF5_TEST_DIR}/compiler_has_h5_cxx) - file(WRITE "${_HDF5_TEST_SRC}" + file(WRITE "${_HDF5_TEST_DIR}/${_HDF5_TEST_SRC}" "#include \n" "#ifndef H5_NO_NAMESPACE\n" "using namespace H5;\n" @@ -281,7 +281,7 @@ function(_HDF5_test_regular_compiler_CXX success version is_parallel) " H5File file(\"foo.h5\", H5F_ACC_TRUNC);\n" " return 0;\n" "}") - try_compile(${success} SOURCES "${_HDF5_TEST_SRC}" + try_compile(${success} SOURCES "${_HDF5_TEST_DIR}/${_HDF5_TEST_SRC}" COPY_FILE ${_HDF5_TEST_DIR}/compiler_has_h5_cxx ) endif() @@ -308,14 +308,14 @@ endfunction() function(_HDF5_test_regular_compiler_Fortran success is_parallel) if(NOT ${success}) - file(WRITE "${_HDF5_TEST_SRC}" + file(WRITE "${_HDF5_TEST_DIR}/${_HDF5_TEST_SRC}" "program hdf5_hello\n" " use hdf5\n" " integer error\n" " call h5open_f(error)\n" " call h5close_f(error)\n" "end\n") - try_compile(${success} SOURCES "${_HDF5_TEST_SRC}") + try_compile(${success} SOURCES "${_HDF5_TEST_DIR}/${_HDF5_TEST_SRC}") if(${success}) execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -showconfig OUTPUT_VARIABLE config_output @@ -588,23 +588,23 @@ if(NOT HDF5_FOUND) # First check to see if our regular compiler is one of wrappers if(_lang STREQUAL "C") - set(_HDF5_TEST_SRC ${_HDF5_TEST_DIR}/cmake_hdf5_test.c) + set(_HDF5_TEST_SRC cmake_hdf5_test.c) if(CMAKE_CXX_COMPILER_LOADED AND NOT CMAKE_C_COMPILER_LOADED) # CXX project without C enabled - set(_HDF5_TEST_SRC ${_HDF5_TEST_DIR}/cmake_hdf5_test.cxx) + set(_HDF5_TEST_SRC cmake_hdf5_test.cxx) endif() _HDF5_test_regular_compiler_C( HDF5_${_lang}_COMPILER_NO_INTERROGATE HDF5_${_lang}_VERSION HDF5_${_lang}_IS_PARALLEL) elseif(_lang STREQUAL "CXX") - set(_HDF5_TEST_SRC ${_HDF5_TEST_DIR}/cmake_hdf5_test.cxx) + set(_HDF5_TEST_SRC cmake_hdf5_test.cxx) _HDF5_test_regular_compiler_CXX( HDF5_${_lang}_COMPILER_NO_INTERROGATE HDF5_${_lang}_VERSION HDF5_${_lang}_IS_PARALLEL) elseif(_lang STREQUAL "Fortran") - set(_HDF5_TEST_SRC ${_HDF5_TEST_DIR}/cmake_hdf5_test.f90) + set(_HDF5_TEST_SRC cmake_hdf5_test.f90) _HDF5_test_regular_compiler_Fortran( HDF5_${_lang}_COMPILER_NO_INTERROGATE HDF5_${_lang}_IS_PARALLEL) -- cgit v0.12 From ee075a53c883775e8753e0fe6ba240eba9dcaae6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 27 Mar 2023 13:58:51 -0400 Subject: FindHDF5: Record compiler wrapper checks to configure log --- Modules/FindHDF5.cmake | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index c1e6a64..a44c6f9 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -356,9 +356,13 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var ERROR_VARIABLE output RESULT_VARIABLE return_value ) - if(return_value AND NOT HDF5_FIND_QUIETLY) - message(STATUS - "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.") + if(NOT return_value EQUAL 0) + message(CONFIGURE_LOG + "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.\n\n${output}") + if(NOT HDF5_FIND_QUIETLY) + message(STATUS + "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.") + endif() else() execute_process( COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -show ${lib_type_args} "${_HDF5_TEST_SRC}" @@ -368,9 +372,13 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var RESULT_VARIABLE return_value OUTPUT_STRIP_TRAILING_WHITESPACE ) - if(return_value AND NOT HDF5_FIND_QUIETLY) - message(STATUS - "Unable to determine HDF5 ${language} flags from HDF5 wrapper.") + if(NOT return_value EQUAL 0) + message(CONFIGURE_LOG + "Unable to determine HDF5 ${language} flags from HDF5 wrapper.\n\n${output}") + if(NOT HDF5_FIND_QUIETLY) + message(STATUS + "Unable to determine HDF5 ${language} flags from HDF5 wrapper.") + endif() endif() execute_process( COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -showconfig @@ -379,9 +387,13 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var RESULT_VARIABLE return_value OUTPUT_STRIP_TRAILING_WHITESPACE ) - if(return_value AND NOT HDF5_FIND_QUIETLY) - message(STATUS - "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.") + if(NOT return_value EQUAL 0) + message(CONFIGURE_LOG + "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.\n\n${output}") + if(NOT HDF5_FIND_QUIETLY) + message(STATUS + "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.") + endif() endif() string(REGEX MATCH "HDF5 Version: ([a-zA-Z0-9\\.\\-]*)" version "${config_output}") if(version) -- cgit v0.12 From 0e87e6c1a40f8b5cce76599840c7aac23e183ac3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Mar 2023 16:33:54 -0400 Subject: Tests: Add FindMPI test environment modification option Provide a way to configure an environment specific to this test. Avoid setting the environment globally for it in CI jobs. --- .gitlab/ci/configure_fedora37_makefiles.cmake | 1 + .gitlab/ci/env_fedora37_makefiles.cmake | 1 - Tests/FindMPI/CMakeLists.txt | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/configure_fedora37_makefiles.cmake b/.gitlab/ci/configure_fedora37_makefiles.cmake index f5676aa..2950eaa 100644 --- a/.gitlab/ci/configure_fedora37_makefiles.cmake +++ b/.gitlab/ci/configure_fedora37_makefiles.cmake @@ -45,6 +45,7 @@ set(CMake_TEST_FindLibXslt "ON" CACHE BOOL "") set(CMake_TEST_FindMPI_C "ON" CACHE BOOL "") set(CMake_TEST_FindMPI_CXX "ON" CACHE BOOL "") set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "") +set(CMake_TEST_FindMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") set(CMake_TEST_FindMPI "ON" CACHE BOOL "") set(CMake_TEST_FindODBC "ON" CACHE BOOL "") set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") diff --git a/.gitlab/ci/env_fedora37_makefiles.cmake b/.gitlab/ci/env_fedora37_makefiles.cmake index 2bcb6d0..ef13cda 100644 --- a/.gitlab/ci/env_fedora37_makefiles.cmake +++ b/.gitlab/ci/env_fedora37_makefiles.cmake @@ -1,2 +1 @@ set(ENV{MY_RUBY_HOME} "/usr/local/rvm/rubies/ruby-3.0.4") -set(ENV{PATH} "/usr/lib64/mpich/bin:$ENV{PATH}") diff --git a/Tests/FindMPI/CMakeLists.txt b/Tests/FindMPI/CMakeLists.txt index 121d978..1bc12c8 100644 --- a/Tests/FindMPI/CMakeLists.txt +++ b/Tests/FindMPI/CMakeLists.txt @@ -19,3 +19,6 @@ add_test(NAME FindMPI.Test COMMAND -DMPI_TEST_Fortran=${CMake_TEST_FindMPI_FLAG_Fortran} --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) +if(CMake_TEST_FindMPI_ENVMOD) + set_property(TEST FindMPI.Test PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindMPI_ENVMOD}) +endif() -- cgit v0.12 From ad9e151045ade825d1f9e024f2cf977ecb9d68c6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 24 Mar 2023 20:41:15 -0400 Subject: Tests: Add cases covering FindHDF5 variables and imported targets --- Tests/CMakeLists.txt | 1 + Tests/FindHDF5/CMakeLists.txt | 84 ++++++++++++++++++++++++++++++++++++++ Tests/FindHDF5/Test/CMakeLists.txt | 58 ++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 Tests/FindHDF5/CMakeLists.txt create mode 100644 Tests/FindHDF5/Test/CMakeLists.txt diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 446e400..e92d1c1 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1450,6 +1450,7 @@ if(BUILD_TESTING) GnuTLS GSL GTK2 + HDF5 Iconv ICU ImageMagick diff --git a/Tests/FindHDF5/CMakeLists.txt b/Tests/FindHDF5/CMakeLists.txt new file mode 100644 index 0000000..373759e --- /dev/null +++ b/Tests/FindHDF5/CMakeLists.txt @@ -0,0 +1,84 @@ +# These tests may be configured by cache entries: +# +# CMake_TEST_FindHDF5:BOOL=ON +# Enable this directory. +# +# CMake_TEST_FindHDF5___COMPILER:FILEPATH=... +# Enable testing for a variant/language combination with the given wrapper. +# Variants: Serial, OpenMPI, MPICH +# Languages: C, CXX, Fortran +# +# CMake_TEST_FindHDF5___COMPILER_EXPLICIT:BOOL=ON +# Pass the above wrapper path to the test as HDF5__COMPILER_EXECUTABLE. + +set(test_langs C CXX) +if(CMAKE_Fortran_COMPILER) + list(APPEND test_langs Fortran) +endif() + +# Test detection without any special hints. +add_test(NAME FindHDF5.Default COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindHDF5/Test" + "${CMake_BINARY_DIR}/Tests/FindHDF5/Test-Default" + ${build_generator_args} + --build-project TestFindHDF5 + --build-options ${build_options} -DTEST_SERIAL=1 "-DTEST_LANGS=${test_langs}" + ) + +foreach(variant Serial OpenMPI MPICH) + set(wrapper "") + set(wrapper_langs "") + set(wrapper_as_compiler "") + foreach(lang IN LISTS test_langs) + if(CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER) + list(APPEND wrapper_langs ${lang}) + list(APPEND wrapper_as_compiler -DCMAKE_${lang}_COMPILER=${CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER}) + if(CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER_EXPLICIT) + list(APPEND wrapper -DHDF5_${lang}_COMPILER_EXECUTABLE=${CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER}) + endif() + endif() + endforeach() + + if(NOT wrapper_langs) + continue() + endif() + + if(variant STREQUAL "Serial") + set(test_kind -DTEST_SERIAL=1) + else() + set(test_kind -DTEST_PARALLEL=1) + endif() + + # Test detection using the HDF5 compiler wrappers as a reference. + add_test(NAME FindHDF5.${variant} COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindHDF5/Test" + "${CMake_BINARY_DIR}/Tests/FindHDF5/Test-${variant}" + ${build_generator_args} + --build-project TestFindHDF5 + --build-options ${build_options} ${test_kind} "-DTEST_LANGS=${wrapper_langs}" ${wrapper} + ) + if(CMake_TEST_FindHDF5_${variant}_ENVMOD) + set_property(TEST FindHDF5.${variant} PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindHDF5_${variant}_ENVMOD}) + endif() + + # Test detection using the HDF5 compiler wrappers as the compiler. + # Skip this if there are spaces in the path. The HDF5 wrappers do not like them. + if(NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ") + add_test(NAME FindHDF5.${variant}-Wrapper COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindHDF5/Test" + "${CMake_BINARY_DIR}/Tests/FindHDF5/Test-${variant}-Wrapper" + ${build_generator_args} + --build-project TestFindHDF5 + --build-options ${build_options} ${test_kind} "-DTEST_LANGS=${wrapper_langs}" -D TEST_WRAPPER_AS_COMPILER=1 ${wrapper_as_compiler} + ) + if(CMake_TEST_FindHDF5_${variant}_ENVMOD) + set_property(TEST FindHDF5.${variant}-Wrapper PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindHDF5_${variant}_ENVMOD}) + endif() + endif() +endforeach() diff --git a/Tests/FindHDF5/Test/CMakeLists.txt b/Tests/FindHDF5/Test/CMakeLists.txt new file mode 100644 index 0000000..53ad633 --- /dev/null +++ b/Tests/FindHDF5/Test/CMakeLists.txt @@ -0,0 +1,58 @@ +cmake_minimum_required(VERSION 3.26) +project(TestFindHDF5 LANGUAGES ${TEST_LANGS}) +message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)") + +if(TEST_PARALLEL) + set(HDF5_PREFER_PARALLEL 1) +endif() + +find_package(HDF5 REQUIRED COMPONENTS ${TEST_LANGS} HL) + +set(variables HDF5_FOUND HDF5_VERSION) +if(NOT TEST_WRAPPER_AS_COMPILER) + list(APPEND variables HDF5_INCLUDE_DIRS HDF5_LIBRARIES HDF5_HL_LIBRARIES) + foreach(lang ${TEST_LANGS}) + list(APPEND variables + HDF5_${lang}_COMPILER_EXECUTABLE + HDF5_${lang}_INCLUDE_DIRS + HDF5_${lang}_LIBRARIES + HDF5_${lang}_HL_LIBRARIES + ) + endforeach() + endif() +foreach(var IN LISTS variables) + message(STATUS "${var}='${${var}}'") +endforeach() +foreach(var IN LISTS variables) + if(NOT DEFINED ${var}) + message(SEND_ERROR "Variable '${var}' is not defined!") + endif() +endforeach() + +set(targets HDF5::HDF5) +if(CMAKE_C_COMPILER_LOADED) + list(APPEND targets hdf5::hdf5 hdf5::hdf5_hl) +endif() +if(CMAKE_CXX_COMPILER_LOADED) + list(APPEND targets hdf5::hdf5_cpp hdf5::hdf5_hl_cpp) +endif() +if(CMAKE_Fortran_COMPILER_LOADED) + list(APPEND targets hdf5::hdf5_fortran hdf5::hdf5_hl_fortran) +endif() +foreach(target IN LISTS targets) + if(NOT TARGET ${target}) + message(SEND_ERROR "Target '${target}' not defined!") + endif() +endforeach() + +message(STATUS "HDF5_IS_PARALLEL='${HDF5_IS_PARALLEL}'") +if(TEST_SERIAL) + if(HDF5_IS_PARALLEL) + message(SEND_ERROR "HDF5_IS_PARALLEL is true in serial test.") + endif() +endif() +if(TEST_PARALLEL) + if(NOT HDF5_IS_PARALLEL) + message(SEND_ERROR "HDF5_IS_PARALLEL is false in parallel test.") + endif() +endif() -- cgit v0.12 From 28c4945a8a2f1a1f6fa2800167b48e649b2dccd8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Mar 2023 15:43:02 -0400 Subject: ci: Add HDF5 to Debian and Fedora base images --- .gitlab/ci/docker/debian10-aarch64/deps_packages.lst | 3 +++ .gitlab/ci/docker/debian10/deps_packages.lst | 3 +++ .gitlab/ci/docker/fedora37/deps_packages.lst | 3 +++ .gitlab/os-linux.yml | 6 +++--- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst b/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst index 36b5d8c..ca83323 100644 --- a/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst +++ b/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst @@ -59,6 +59,9 @@ libgrpc++-dev libgrpc-dev libgsl-dev libgtest-dev libgtk2.0-dev +libhdf5-dev +libhdf5-mpich-dev +libhdf5-openmpi-dev libicu-dev libinput-dev libjpeg-dev diff --git a/.gitlab/ci/docker/debian10/deps_packages.lst b/.gitlab/ci/docker/debian10/deps_packages.lst index bd4377a..0b79675 100644 --- a/.gitlab/ci/docker/debian10/deps_packages.lst +++ b/.gitlab/ci/docker/debian10/deps_packages.lst @@ -62,6 +62,9 @@ libgrpc++-dev libgrpc-dev libgsl-dev libgtest-dev libgtk2.0-dev +libhdf5-dev +libhdf5-mpich-dev +libhdf5-openmpi-dev libicu-dev libinput-dev libjpeg-dev diff --git a/.gitlab/ci/docker/fedora37/deps_packages.lst b/.gitlab/ci/docker/fedora37/deps_packages.lst index 61382b5..51f84ff 100644 --- a/.gitlab/ci/docker/fedora37/deps_packages.lst +++ b/.gitlab/ci/docker/fedora37/deps_packages.lst @@ -73,6 +73,9 @@ grpc-devel grpc-plugins gsl-devel gtest-devel gtk2-devel +hdf5-devel +hdf5-mpich-devel +hdf5-openmpi-devel ImageMagick-c++-devel java-11-openjdk-devel jsoncpp-devel diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 60cd0b7..3d62b01 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -45,7 +45,7 @@ ### Debian .debian10: - image: "kitware/cmake:ci-debian10-x86_64-2023-03-08" + image: "kitware/cmake:ci-debian10-x86_64-2023-03-29" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -60,7 +60,7 @@ CMAKE_CI_NO_INSTALL: 1 .debian10_aarch64: - image: "kitware/cmake:ci-debian10-aarch64-2023-03-08" + image: "kitware/cmake:ci-debian10-aarch64-2023-03-29" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -69,7 +69,7 @@ ### Fedora .fedora37: - image: "kitware/cmake:ci-fedora37-x86_64-2023-03-08" + image: "kitware/cmake:ci-fedora37-x86_64-2023-03-29" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes" -- cgit v0.12 From d38c752de294c95e9efbe06f6f0eac1c94ccbc32 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Mar 2023 15:58:08 -0400 Subject: ci: Enable FindHDF5 tests on Linux builds --- .gitlab/ci/configure_debian10_aarch64_ninja.cmake | 16 ++++++++++++++++ .gitlab/ci/configure_debian10_ninja.cmake | 16 ++++++++++++++++ .gitlab/ci/configure_fedora37_makefiles.cmake | 12 ++++++++++++ 3 files changed, 44 insertions(+) diff --git a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake index 16282b6..dff0db1 100644 --- a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake +++ b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake @@ -25,6 +25,22 @@ set(CMake_TEST_FindGnuTLS "ON" CACHE BOOL "") set(CMake_TEST_FindGSL "ON" CACHE BOOL "") set(CMake_TEST_FindGTest "ON" CACHE BOOL "") set(CMake_TEST_FindGTK2 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_MPICH_C_COMPILER "/usr/bin/h5pcc.mpich" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_MPICH_C_COMPILER_EXPLICIT "ON" CACHE BOOL "") +# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER "/usr/bin/h5c++.mpich" CACHE FILEPATH "") # h5c++.mpich does not exist +# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER "/usr/bin/h5pfc.mpich" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER "/usr/bin/h5pcc.openmpi" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER_EXPLICIT "ON" CACHE BOOL "") +# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER "/usr/bin/h5c++.openmpi" CACHE FILEPATH "") # h5c++.openmpi does not exist +# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER "/usr/bin/h5pfc.openmpi" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_Serial_C_COMPILER "/usr/bin/h5cc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_CXX_COMPILER "/usr/bin/h5c++" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_Fortran_COMPILER "/usr/bin/h5fc" CACHE FILEPATH "") set(CMake_TEST_FindIconv "ON" CACHE BOOL "") set(CMake_TEST_FindICU "ON" CACHE BOOL "") set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") diff --git a/.gitlab/ci/configure_debian10_ninja.cmake b/.gitlab/ci/configure_debian10_ninja.cmake index 327c1c5..211a2a7 100644 --- a/.gitlab/ci/configure_debian10_ninja.cmake +++ b/.gitlab/ci/configure_debian10_ninja.cmake @@ -29,6 +29,22 @@ set(CMake_TEST_FindGnuTLS "ON" CACHE BOOL "") set(CMake_TEST_FindGSL "ON" CACHE BOOL "") set(CMake_TEST_FindGTest "ON" CACHE BOOL "") set(CMake_TEST_FindGTK2 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_MPICH_C_COMPILER "/usr/bin/h5pcc.mpich" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_MPICH_C_COMPILER_EXPLICIT "ON" CACHE BOOL "") +# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER "/usr/bin/h5c++.mpich" CACHE FILEPATH "") # h5c++.mpich does not exist +# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER "/usr/bin/h5pfc.mpich" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER "/usr/bin/h5pcc.openmpi" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER_EXPLICIT "ON" CACHE BOOL "") +# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER "/usr/bin/h5c++.openmpi" CACHE FILEPATH "") # h5c++.openmpi does not exist +# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER "/usr/bin/h5pfc.openmpi" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER_EXPLICIT "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_Serial_C_COMPILER "/usr/bin/h5cc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_CXX_COMPILER "/usr/bin/h5c++" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_Fortran_COMPILER "/usr/bin/h5fc" CACHE FILEPATH "") set(CMake_TEST_FindIconv "ON" CACHE BOOL "") set(CMake_TEST_FindICU "ON" CACHE BOOL "") set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") diff --git a/.gitlab/ci/configure_fedora37_makefiles.cmake b/.gitlab/ci/configure_fedora37_makefiles.cmake index 2950eaa..0a271bf 100644 --- a/.gitlab/ci/configure_fedora37_makefiles.cmake +++ b/.gitlab/ci/configure_fedora37_makefiles.cmake @@ -28,6 +28,18 @@ set(CMake_TEST_FindGnuTLS "ON" CACHE BOOL "") set(CMake_TEST_FindGSL "ON" CACHE BOOL "") set(CMake_TEST_FindGTest "ON" CACHE BOOL "") set(CMake_TEST_FindGTK2 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_MPICH_C_COMPILER "/usr/lib64/mpich/bin/h5pcc" CACHE FILEPATH "") +# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER "/usr/lib64/mpich/bin/h5pc++" CACHE FILEPATH "") # h5pc++ does not exist +set(CMake_TEST_FindHDF5_MPICH_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") +set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER "/usr/lib64/mpich/bin/h5pfc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER "/usr/lib64/openmpi/bin/h5pcc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/openmpi/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/openmpi/lib" CACHE STRING "") +# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER "/usr/lib64/openmpi/bin/h5pc++" CACHE FILEPATH "") # h5pc++ does not exist +# set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER "/usr/lib64/openmpi/bin/h5pfc" CACHE FILEPATH "") # cannot find its own hdf5.mod +set(CMake_TEST_FindHDF5_Serial_C_COMPILER "/usr/bin/h5cc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_CXX_COMPILER "/usr/bin/h5c++" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_Fortran_COMPILER "/usr/bin/h5fc" CACHE FILEPATH "") set(CMake_TEST_FindIconv "ON" CACHE BOOL "") set(CMake_TEST_FindICU "ON" CACHE BOOL "") set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") -- cgit v0.12