Closed nmusolino closed 6 months ago
To test this, I confirmed that, when configuring with USE_LAPACK=1
, the build process continues to compile with -DUSE_LAPACK
and link with -lm -lblas -llapack
, as currently.
When configuring with USE_LAPACK=0
:
cmake -S . -B ./build0 -D USE_LAPACK=0 && (cd ./build0 && make VERBOSE=1 all)
the build process does not use USE_LAPACK=1
and links with only -lm
.
@bodono , I contributed #257 in October 2023, but unfortunately that MR had an omission (failed to set linker options based on USE_LAPACK
). This MR fixes that mistake.
Thanks for doing this @nmusolino !
In a recent pull request (https://github.com/cvxgrp/scs/pull/257), we added
USE_LAPACK
as a CMake-level variable controlling whetherUSE_LAPACK
is defined during C compilation.Unfortunately, that pull request failed to update the link-time dependencies of the
libscsdir
andlibscsindir
targets. This PR fixes thetarget_link_libraries()
declarations to link againstblas
andlapack
if and only ifUSE_LAPACK
is true.