diff options
author | Brad King <brad.king@kitware.com> | 2022-07-07 13:01:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-07-07 13:02:01 (GMT) |
commit | acc6a086412c777c95e1bb3865d17576abe73a6d (patch) | |
tree | 88f2e1a0bd608429e4f81c87b2779b472e33350f /Modules | |
parent | 9b051f557eef1ed99ba264f5528a00818413f34d (diff) | |
parent | 28d52a43fc1f69cfff9f87d167b897f13ec60fe2 (diff) | |
download | CMake-acc6a086412c777c95e1bb3865d17576abe73a6d.zip CMake-acc6a086412c777c95e1bb3865d17576abe73a6d.tar.gz CMake-acc6a086412c777c95e1bb3865d17576abe73a6d.tar.bz2 |
Merge topic 'FindLAPACK-nvhpc' into release-3.24
28d52a43fc FindLAPACK: Add '-fortranlibs' flag only with NVHPC/PGI compilers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7452
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindLAPACK.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 50d4ebd..b08b359 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -663,6 +663,10 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) elseif(_lapack_sizeof_integer EQUAL 4) string(APPEND _lapack_nvhpc_lib "_lp64") endif() + set(_lapack_nvhpc_flags) + if(";${CMAKE_C_COMPILER_ID};${CMAKE_CXX_COMPILER_ID};${CMAKE_Fortran_COMPILER_ID};" MATCHES ";(NVHPC|PGI);") + set(_lapack_nvhpc_flags "-fortranlibs") + endif() check_lapack_libraries( LAPACK_LIBRARIES @@ -670,7 +674,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) cheev "" "${_lapack_nvhpc_lib}" - "-fortranlibs" + "${_lapack_nvhpc_flags}" "" "" "${BLAS_LIBRARIES}" @@ -688,7 +692,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) cheev "" "${_lapack_nvhpc_lib}" - "-fortranlibs" + "${_lapack_nvhpc_flags}" "" "" "${BLAS_LIBRARIES}" @@ -696,6 +700,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) endif() unset(_lapack_nvhpc_lib) + unset(_lapack_nvhpc_flags) endif() # Generic LAPACK library? |