瀏覽代碼

Merge topic 'FindArmadillo-msvc-link-transitive' into release-4.0

6745af99c8 FindArmadillo: Fix wrapper linking with MSVC

Acked-by: Kitware Robot <[email protected]>
Merge-request: !10292
Brad King 10 月之前
父節點
當前提交
95fc2b982a
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      Modules/FindArmadillo.cmake

+ 6 - 1
Modules/FindArmadillo.cmake

@@ -99,8 +99,13 @@ if(_ARMA_USE_WRAPPER)
   mark_as_advanced(ARMADILLO_LIBRARY)
   set(_ARMA_REQUIRED_VARS ARMADILLO_LIBRARY)
 else()
-  # Link directly to individual components.
   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
       LAPACK
       BLAS