mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
FindArmadillo: Fix wrapper linking with MSVC
Transitive linking does not work with MSVC, so we must link against both Armadillo and its dependencies directly if `ARMA_USE_WRAPPER` is enabled.
This commit is contained in:
@@ -99,8 +99,13 @@ if(_ARMA_USE_WRAPPER)
|
|||||||
mark_as_advanced(ARMADILLO_LIBRARY)
|
mark_as_advanced(ARMADILLO_LIBRARY)
|
||||||
set(_ARMA_REQUIRED_VARS ARMADILLO_LIBRARY)
|
set(_ARMA_REQUIRED_VARS ARMADILLO_LIBRARY)
|
||||||
else()
|
else()
|
||||||
# Link directly to individual components.
|
|
||||||
set(ARMADILLO_LIBRARY "")
|
set(ARMADILLO_LIBRARY "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Transitive linking with the wrapper does not work with MSVC,
|
||||||
|
# so we must *also* link against Armadillo's dependencies.
|
||||||
|
if(NOT _ARMA_USE_WRAPPER OR MSVC)
|
||||||
|
# Link directly to individual components.
|
||||||
foreach(pkg
|
foreach(pkg
|
||||||
LAPACK
|
LAPACK
|
||||||
BLAS
|
BLAS
|
||||||
|
|||||||
Reference in New Issue
Block a user