From 74fb8cc1be8d188ebd63375a77a1bd0cfc5aeccd Mon Sep 17 00:00:00 2001 From: Matthijs Brobbel Date: Thu, 29 Feb 2024 11:23:21 +0100 Subject: [PATCH] Set `_CORROSION_VERBOSE_OUTPUT_FLAG` as cache entry The value of the `_CORROSION_VERBOSE_OUTPUT_FLAG` variable (set based on the `CORROSION_VERBOSE_OUTPUT` option) isn't propagated to the `_add_cargo_build` function where it is used: https://github.com/corrosion-rs/corrosion/blob/0a3bdf452995803c334d79dc9a2affbfad51b720/cmake/Corrosion.cmake#L768 Setting it as cache entry fixes that. --- cmake/Corrosion.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Corrosion.cmake b/cmake/Corrosion.cmake index 682ba5a7..590f0191 100644 --- a/cmake/Corrosion.cmake +++ b/cmake/Corrosion.cmake @@ -511,10 +511,10 @@ include(CorrosionGenerator) # Note: `cmake_language(GET_MESSAGE_LOG_LEVEL )` requires CMake 3.25, # so we offer our own option to control verbosity of downstream commands (e.g. cargo build) if (CORROSION_VERBOSE_OUTPUT) - set(_CORROSION_VERBOSE_OUTPUT_FLAG --verbose) + set(_CORROSION_VERBOSE_OUTPUT_FLAG --verbose CACHE INTERNAL "") else() # We want to silence some less important commands by default. - set(_CORROSION_QUIET_OUTPUT_FLAG --quiet) + set(_CORROSION_QUIET_OUTPUT_FLAG --quiet CACHE INTERNAL "") endif() set(_CORROSION_CARGO_VERSION ${Rust_CARGO_VERSION} CACHE INTERNAL "cargo version used by corrosion")