FindLAPACK broke on Windows between 3.11.1 and 3.13.3 or 3.12.18081601-MSVC_2 and 3.13.3
A project I support requires cross platform support. It uses the Intel Fortran compiler on windows, and the "every day" (client) developers want to be able to use MSVS. At some point, between CMake 3.11.1 and 3.13.3 calls to
find_package(LAPACK) stopped working. Looking at the file history, I would guess that commits by @jacub in October and November are responsible for this breakage. In addition, I tested with CMake that ships with Visual Studio 15 2017 (CMake 3.12.18081601_MSVC_2 ) and this also works. So the breakage is localized to 3.13.
In a shell I run
compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64 and then
mkdir build cd build /path/to/cmake-3.13.3/cmake.exe -G "Visual Studio 15 2017 Win65" -T host=x64 -Wdev ..
This produces an error with a simple reproducer:
cmake_minimum_required(VERSION 3.11) cmake_policy(VERSION(3.11.1...3.13.3) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW( endif() enable_language(Fortran C) find_package(BLAS REQUIRED) find_package(LAPACK REQUIRED)
The error is "A required library with LAPACK API not found. ..."
Running the same test with the 3.12 version of CMake that ships with MSVS 15 2017 or with CMake 3.11.1 does not produce this error.
It would be awesome if someone could resolve this for the next release of CMake. Thanks!