Browse code

Merge pull request #1301 from liushuyu/respect-build-flags

cmake/FindRust.cmake: inherit RUSTFLAGS from the environment

Micah Snyder authored on 2024/07/24 01:53:20
Showing 1 changed files
... ...
@@ -488,7 +488,7 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
488 488
 else()
489 489
     set(CARGO_BUILD_TYPE "debug")
490 490
 endif()
491
-string(STRIP "${RUSTFLAGS}" RUSTFLAGS)
491
+string(STRIP "${RUSTFLAGS} $ENV{RUSTFLAGS}" RUSTFLAGS)
492 492
 
493 493
 find_package_handle_standard_args(Rust
494 494
     REQUIRED_VARS cargo_EXECUTABLE