Skip to content

Commit bd1fba1

Browse files
CMake: have LAPACKE check available LAPACK arithmetic
If the user requests LAPACKE to be built for a certain arithmetic (e.g., real double-precision), check if the LAPACK library contains code for the requested arithmetic.
1 parent 1782d90 commit bd1fba1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

LAPACKE/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ option(LAPACKE_BUILD_DOUBLE "Build LAPACKE double precision real" ON)
2626
option(LAPACKE_BUILD_COMPLEX "Build LAPACKE single precision complex" ON)
2727
option(LAPACKE_BUILD_COMPLEX16 "Build LAPACKE double precision complex" ON)
2828

29+
foreach(precision SINGLE DOUBLE COMPLEX COMPLEX16)
30+
if(LAPACKE_BUILD_${precision} AND NOT BUILD_${precision})
31+
message(
32+
SEND_ERROR
33+
"LAPACKE_BUILD_${precision} requires BUILD_${precision} to be ON"
34+
)
35+
endif()
36+
endforeach()
37+
2938
macro(append_subdir_files variable dirname)
3039
get_directory_property(holder DIRECTORY ${dirname} DEFINITION ${variable})
3140
foreach(depfile ${holder})

0 commit comments

Comments
 (0)