File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ pub struct Config {
60
60
path : PathBuf ,
61
61
generator : Option < OsString > ,
62
62
generator_toolset : Option < OsString > ,
63
- cflags : OsString ,
63
+
64
+ /// Doc
65
+ pub cflags : OsString ,
64
66
cxxflags : OsString ,
65
67
asmflags : OsString ,
66
68
defines : Vec < ( OsString , OsString ) > ,
@@ -762,7 +764,10 @@ impl Config {
762
764
// Also specify this on Windows only if we use MSVC with Ninja,
763
765
// as it's not needed for MSVC with Visual Studio generators and
764
766
// for MinGW it doesn't really vary.
765
- if !self . defined ( "CMAKE_TOOLCHAIN_FILE" )
767
+ let skip_compiler_flag =
768
+ env:: var ( "CMAKE_RS_SKIP_COMPILER_FLAG" ) . ok ( ) == Some ( "1" . to_string ( ) ) ;
769
+ if !skip_compiler_flag
770
+ && !self . defined ( "CMAKE_TOOLCHAIN_FILE" )
766
771
&& !self . defined ( & tool_var)
767
772
&& ( env:: consts:: FAMILY != "windows" || ( msvc && is_ninja) )
768
773
{
You can’t perform that action at this time.
0 commit comments