Closed kcgthb closed 2 years ago
For instance, if I load an OpenBLAS module that adds /share/software/user/open/openblas/0.3.20/lib
to CMAKE_LIBRARY_PATH
:
without that change, cmake
only detects local installations of OpenBLAS:
-- Interface to Extra BLAS Libraries:
-- /usr/lib64/libopenblas.so - OpenBLASSerial
-- /usr/lib64/libopenblasp.so - OpenBLASPThread
-- /usr/lib64/libopenblaso.so - OpenBLASOpenMP
with the change, the new path is also detected:
-- Interface to Extra BLAS Libraries:
-- /share/software/user/open/openblas/0.3.20/lib/libopenblas.so - OpenBLASSerial
-- /usr/lib64/libopenblasp.so - OpenBLASPThread
-- /usr/lib64/libopenblaso.so - OpenBLASOpenMP
Don't restrict paths where
find_library()
will look for things, let it useCMAKE_PREFIX_PATH
andCMAKE_LIBRARY_PATH
when defined.This is in addition of the paths defined with
SET(SEARCH_PATH
and won't prevent detection of locally installed libraries (via package managers).See #27