From e99ac6d3759a1b95d986da5f739438565553a41b Mon Sep 17 00:00:00 2001 From: Umar Arshad Date: Tue, 8 Mar 2022 17:51:58 -0500 Subject: [PATCH] Set AF_COMPUTE_LIBRARY to MKL only if found. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 129927c0d2..db3b8978d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,12 @@ option(AF_WITH_STACKTRACE "Add stacktraces to the error messages." ON) option(AF_CACHE_KERNELS_TO_DISK "Enable caching kernels to disk" ON) option(AF_WITH_STATIC_MKL "Link against static Intel MKL libraries" OFF) -set(AF_COMPUTE_LIBRARY "Intel-MKL" +set(default_compute_library "FFTW/LAPACK/BLAS") +if(MKL_FOUND) + set(default_compute_library "Intel-MKL") +endif() + +set(AF_COMPUTE_LIBRARY ${default_compute_library} CACHE STRING "Compute library for signal processing and linear algebra routines") set_property(CACHE AF_COMPUTE_LIBRARY PROPERTY STRINGS "Intel-MKL" "FFTW/LAPACK/BLAS")