summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDF5UseFortran.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-10-04 20:34:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-10-04 20:34:29 (GMT)
commita5301ee6b832dc18f692b048102f183e3cef6d15 (patch)
tree1ed4c57b49459a7d8dd3ba953ab0ec59ec64573b /config/cmake/HDF5UseFortran.cmake
parent9c39016e1d2253ee6a43f56d4aaab34314afb72b (diff)
downloadhdf5-a5301ee6b832dc18f692b048102f183e3cef6d15.zip
hdf5-a5301ee6b832dc18f692b048102f183e3cef6d15.tar.gz
hdf5-a5301ee6b832dc18f692b048102f183e3cef6d15.tar.bz2
TRILABS-34 Cleanup try_run
Diffstat (limited to 'config/cmake/HDF5UseFortran.cmake')
-rw-r--r--config/cmake/HDF5UseFortran.cmake8
1 files changed, 1 insertions, 7 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 50e69d8..f7f182f 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -39,12 +39,6 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
# set(${RETURN_VAR} ${OUTPUT_VAR})
# else ()
message (STATUS "Detecting Fortran ${FUNCTION_NAME}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else ()
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif ()
file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
"${SOURCE_CODE}"
@@ -52,7 +46,7 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}"
)
if (${COMPILE_RESULT_VAR})