From 664fe8f04697ca1897e5ff1fa0c21278a63c232f 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 ffa86e33f1..2be2cd1fec 100644 --- a/cmake/FindRust.cmake +++ b/cmake/FindRust.cmake @@ -486,7 +486,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