[MacPorts] #64379: lapack @3.10.0: cmake files in wrong location
MacPorts
noreply at macports.org
Fri Mar 15 12:36:58 UTC 2024
#64379: lapack @3.10.0: cmake files in wrong location
------------------------+----------------------
Reporter: lepus2589 | Owner: (none)
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: haspatch
Port: lapack |
------------------------+----------------------
Comment (by lepus2589):
Any minimal {{{CMakeLists.txt}}} file will do:
{{{
cmake_minimum_required(VERSION 3.20)
project(DiscoverLAPACKE VERSION 1.0.0 LANGUAGES C)
find_package(lapacke CONFIG REQUIRED)
}}}
Calling CMake with this file like this:
{{{
$ cmake -B ./build .
CMake Error at CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by "lapacke" with
any
of the following names:
lapackeConfig.cmake
lapacke-config.cmake
Add the installation prefix of "lapacke" to CMAKE_PREFIX_PATH or set
"lapacke_DIR" to a directory containing one of the above files. If
"lapacke" provides a separate development package or SDK, be sure it has
been installed.
}}}
OK, it's in a non-standard location. Let's help CMake:
{{{
$ cmake -B ./build -D
"lapacke_DIR=/opt/local/share/cmake/Modules/lapacke-3.12.0" .
-- Could NOT find LAPACK (missing: LAPACK_DIR)
}}}
It doesn't throw an error, but doesn't discover lapack in the adjacent
directory. Linking an actual project with this configuration would be
impossible. Additionally providing the {{{lapack_DIR}}} variable on the
command line won't help, because the {{{lapacke-config.cmake}}} overwrites
it with an absolute path, which is wrong because it was moved.
--
Ticket URL: <https://trac.macports.org/ticket/64379#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list