From f65b95edeb956f656203d9c5b426281ed25e8841 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Thu, 11 Jul 2024 13:34:06 +0800 Subject: [PATCH] cmake/FindRust.cmake: strip MSVC linker flags ... ... from native libraries array. Otherwise Ninja will get very confused. --- cmake/FindRust.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake index ffa86e33f1..227d0b4552 100644 --- a/cmake/FindRust.cmake +++ b/cmake/FindRust.cmake @@ -430,6 +430,8 @@ foreach(LINE ${LINE_LIST}) string(REPLACE "native-static-libs: " "" LINE "${LINE}") string(REGEX REPLACE " " "" LINE "${LINE}") string(REGEX REPLACE " " ";" LINE "${LINE}") + # remove linker flags + list(FILTER LINE EXCLUDE REGEX "/.*") if(LINE) message(STATUS "Rust's native static libs: ${LINE}")