Skip to content

Commit 8e48e23

Browse files
committed
[SCA]LAPACK_CRAY can be user-set to force Cray detection
1 parent e5b11f8 commit 8e48e23

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

cmake/FindLAPACK.cmake

+6-7
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,11 @@ endmacro(find_mkl_libs)
354354

355355
# ========== main program
356356

357-
set(lapack_cray false)
358-
if(DEFINED ENV{CRAYPE_VERSION})
359-
set(lapack_cray true)
357+
if(NOT DEFINED LAPACK_CRAY AND DEFINED ENV{CRAYPE_VERSION})
358+
set(LAPACK_CRAY true)
360359
endif()
361360

362-
if(NOT (lapack_cray
361+
if(NOT (LAPACK_CRAY
363362
OR OpenBLAS IN_LIST LAPACK_FIND_COMPONENTS
364363
OR Netlib IN_LIST LAPACK_FIND_COMPONENTS
365364
OR Atlas IN_LIST LAPACK_FIND_COMPONENTS
@@ -390,7 +389,7 @@ elseif(OpenBLAS IN_LIST LAPACK_FIND_COMPONENTS)
390389
openblas_libs()
391390
elseif(AOCL IN_LIST LAPACK_FIND_COMPONENTS)
392391
aocl_libs()
393-
elseif(lapack_cray)
392+
elseif(LAPACK_CRAY)
394393
# LAPACK is implicitly part of Cray PE LibSci, use Cray compiler wrapper.
395394
endif()
396395

@@ -445,14 +444,14 @@ endif()
445444
endfunction(lapack_check)
446445

447446
# --- Check library links
448-
if(lapack_cray OR LAPACK_LIBRARY)
447+
if(LAPACK_CRAY OR LAPACK_LIBRARY)
449448
lapack_check()
450449
endif()
451450

452451

453452
include(FindPackageHandleStandardArgs)
454453

455-
if(lapack_cray)
454+
if(LAPACK_CRAY)
456455
find_package_handle_standard_args(LAPACK HANDLE_COMPONENTS
457456
REQUIRED_VARS LAPACK_links
458457
)

0 commit comments

Comments
 (0)