summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2022-09-13 14:07:56 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-14 11:52:16 (GMT)
commit2edf0fc6d73510f4e93e2750bc0dbc8c6c376633 (patch)
treec7d5a791ae4cce38b9dd68e07deeaf2486b83455 /Modules/FindHDF5.cmake
parent83686df1d63e7d2c922de19489ea2bab42e98a4a (diff)
downloadCMake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.zip
CMake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.tar.gz
CMake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.tar.bz2
Modules: Use new keyword-dispatched try_compile signature
Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 40ed9a9..d662a7d 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -238,7 +238,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} ${scratch_directory} ${test_file}
+ try_compile(${success} SOURCES ${test_file}
COPY_FILE ${scratch_directory}/compiler_has_h5_c
)
endif()
@@ -286,7 +286,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} ${scratch_directory} ${test_file}
+ try_compile(${success} SOURCES ${test_file}
COPY_FILE ${scratch_directory}/compiler_has_h5_cxx
)
endif()
@@ -323,7 +323,7 @@ function(_HDF5_test_regular_compiler_Fortran success is_parallel)
" call h5open_f(error)\n"
" call h5close_f(error)\n"
"end\n")
- try_compile(${success} ${scratch_directory} ${test_file})
+ try_compile(${success} SOURCES ${test_file})
if(${success})
execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -showconfig
OUTPUT_VARIABLE config_output