From bef8451ad297c681051eb0a3e39dfad6d5978250 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Wed, 3 Jul 2024 11:04:09 -0600 Subject: [PATCH] cmake/FindRust.cmake: inherit RUSTFLAGS from the environment --- cmake/FindRust.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake index 227d0b4552..5d7e838bd8 100644 --- a/cmake/FindRust.cmake +++ b/cmake/FindRust.cmake @@ -488,7 +488,7 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") else() set(CARGO_BUILD_TYPE "debug") endif() -string(STRIP "${RUSTFLAGS}" RUSTFLAGS) +string(STRIP "${RUSTFLAGS} $ENV{RUSTFLAGS}" RUSTFLAGS) find_package_handle_standard_args(Rust REQUIRED_VARS cargo_EXECUTABLE