File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -344,6 +344,10 @@ impl Config {
344
344
345
345
cmd. arg ( & self . path )
346
346
. current_dir ( & build) ;
347
+ let mut is_ninja = false ;
348
+ if let Some ( ref generator) = self . generator {
349
+ is_ninja = generator. to_string_lossy ( ) . contains ( "Ninja" ) ;
350
+ }
347
351
if target. contains ( "windows-gnu" ) {
348
352
if host. contains ( "windows" ) {
349
353
// On MinGW we need to coerce cmake to not generate a visual
@@ -394,7 +398,7 @@ impl Config {
394
398
if self . generator . is_none ( ) {
395
399
cmd. arg ( "-G" ) . arg ( self . visual_studio_generator ( & target) ) ;
396
400
}
397
- if target. contains ( "x86_64" ) {
401
+ if target. contains ( "x86_64" ) && !is_ninja {
398
402
cmd. arg ( "-Thost=x64" ) ;
399
403
}
400
404
} else if target. contains ( "redox" ) {
@@ -406,10 +410,8 @@ impl Config {
406
410
cmd. arg ( "-DCMAKE_SYSTEM_NAME=SunOS" ) ;
407
411
}
408
412
}
409
- let mut is_ninja = false ;
410
413
if let Some ( ref generator) = self . generator {
411
414
cmd. arg ( "-G" ) . arg ( generator) ;
412
- is_ninja = generator. to_string_lossy ( ) . contains ( "Ninja" ) ;
413
415
}
414
416
let profile = self . profile . clone ( ) . unwrap_or_else ( || {
415
417
// Automatically set the `CMAKE_BUILD_TYPE` if the user did not
You can’t perform that action at this time.
0 commit comments