Regression: FindBLAS fails for Intel MKL
With the following CMakeLists.txt
,
cmake_minimum_required(VERSION 3.1)
project(MWE LANGUAGES CXX)
set(BLA_VENDOR "Intel10_64lp")
find_package(BLAS REQUIRED)
cmake fails:
$ CXX=icpc cmake -B build .
-- The CXX compiler identification is Intel 19.1.2.20200623
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /path/to/icpc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at /usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find BLAS (missing: BLAS_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.20/Modules/FindBLAS.cmake:1078 (find_package_handle_standard_args)
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "build/CMakeFiles/CMakeOutput.log".
See also "build/CMakeFiles/CMakeError.log".
Script done, file is typescript
build/CMakeCache.txt
has the following entry:
//Path to a library.
BLAS__lpthread_LIBRARY:FILEPATH=BLAS__lpthread_LIBRARY-NOTFOUND
Bisect reveals that 4c74c86f (!5954 (merged)) is the first bad commit.