Skip to content

Commit

Permalink
Introduce CMAKE_RS_SKIP_COMPILER_FLAG which remove use of CMAKE_C_COM…
Browse files Browse the repository at this point in the history
…PILER flag from cmake command

* This changes is required in order to build paho-mqtt for armv7-a using Yocto Poky compiler.
  • Loading branch information
lucasdietrich committed Sep 22, 2023
1 parent 3ddc3d5 commit e710a28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,9 @@ impl Config {
// Also specify this on Windows only if we use MSVC with Ninja,
// as it's not needed for MSVC with Visual Studio generators and
// for MinGW it doesn't really vary.
if !self.defined("CMAKE_TOOLCHAIN_FILE")
let skip_compiler_flag = env::var("CMAKE_RS_SKIP_COMPILER_FLAG").ok() == Some("1".to_string());
if !skip_compiler_flag
&& !self.defined("CMAKE_TOOLCHAIN_FILE")
&& !self.defined(&tool_var)
&& (env::consts::FAMILY != "windows" || (msvc && is_ninja))
{
Expand Down

0 comments on commit e710a28

Please sign in to comment.