diff options
author | Brad King <brad.king@kitware.com> | 2021-04-21 18:20:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-21 18:20:28 (GMT) |
commit | 2e2db28e2f19ebde06d2bd5248a8828568dbd306 (patch) | |
tree | 5cf393d6875c95735a2c7e149ce5cb21384e6483 /Modules/FindLAPACK.cmake | |
parent | 02fbe4083c95b46dd5b066639f40ce33f75f2d46 (diff) | |
download | CMake-2e2db28e2f19ebde06d2bd5248a8828568dbd306.zip CMake-2e2db28e2f19ebde06d2bd5248a8828568dbd306.tar.gz CMake-2e2db28e2f19ebde06d2bd5248a8828568dbd306.tar.bz2 |
Find{BLAS,LAPACK}: Simplify check_function_exists state maintenance
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_REQUIRED_QUIET` locally without affecting the global state.
Diffstat (limited to 'Modules/FindLAPACK.cmake')
-rw-r--r-- | Modules/FindLAPACK.cmake | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index d89c40d..3529b12 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -127,7 +127,6 @@ if(CMAKE_Fortran_COMPILER_LOADED) else() include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) endif() -include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) function(_add_lapack_target) @@ -164,9 +163,6 @@ function(_add_lapack_target) endfunction() macro(_lapack_find_library_setup) - cmake_push_check_state() - set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY}) - set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) if(BLA_STATIC) if(WIN32) @@ -185,7 +181,6 @@ endmacro() macro(_lapack_find_library_teardown) set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) unset(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) - cmake_pop_check_state() endmacro() # TODO: move this stuff to a separate module @@ -243,6 +238,7 @@ function(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addl if(_libraries_work) # Test this combination of libraries. set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${_libraries} ${_blas} ${_deps}) + set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY}) if(CMAKE_Fortran_COMPILER_LOADED) check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) else() |