Skip to content

Commit e710a28

Browse files
committed
Introduce CMAKE_RS_SKIP_COMPILER_FLAG which remove use of CMAKE_C_COMPILER flag from cmake command
* This changes is required in order to build paho-mqtt for armv7-a using Yocto Poky compiler.
1 parent 3ddc3d5 commit e710a28

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,9 @@ impl Config {
762762
// Also specify this on Windows only if we use MSVC with Ninja,
763763
// as it's not needed for MSVC with Visual Studio generators and
764764
// for MinGW it doesn't really vary.
765-
if !self.defined("CMAKE_TOOLCHAIN_FILE")
765+
let skip_compiler_flag = env::var("CMAKE_RS_SKIP_COMPILER_FLAG").ok() == Some("1".to_string());
766+
if !skip_compiler_flag
767+
&& !self.defined("CMAKE_TOOLCHAIN_FILE")
766768
&& !self.defined(&tool_var)
767769
&& (env::consts::FAMILY != "windows" || (msvc && is_ninja))
768770
{

0 commit comments

Comments
 (0)