@@ -234,6 +234,8 @@ opts.Add(BoolVariable("dev_mode", "Alias for dev options: verbose=yes warnings=e
234
234
opts .Add (BoolVariable ("tests" , "Build the unit tests" , False ))
235
235
opts .Add (BoolVariable ("fast_unsafe" , "Enable unsafe options for faster rebuilds" , False ))
236
236
opts .Add (BoolVariable ("ninja" , "Use the ninja backend for faster rebuilds" , False ))
237
+ opts .Add (BoolVariable ("ninja_auto_run" , "Run ninja automatically after generating the ninja file" , True ))
238
+ opts .Add ("ninja_file" , "Path to the generated ninja file" , "build.ninja" )
237
239
opts .Add (BoolVariable ("compiledb" , "Generate compilation DB (`compile_commands.json`) for external tools" , False ))
238
240
opts .Add (BoolVariable ("verbose" , "Enable verbose output for the compilation" , False ))
239
241
opts .Add (BoolVariable ("progress" , "Show a progress indicator during compilation" , True ))
@@ -1031,13 +1033,10 @@ if env["ninja"]:
1031
1033
Exit (255 )
1032
1034
1033
1035
SetOption ("experimental" , "ninja" )
1036
+ env ["NINJA_FILE_NAME" ] = env ["ninja_file" ]
1037
+ env ["NINJA_DISABLE_AUTO_RUN" ] = not env ["ninja_auto_run" ]
1034
1038
env .Tool ("ninja" )
1035
1039
1036
- # By setting this we allow the user to run ninja by themselves with all
1037
- # the flags they need, as apparently automatically running from scons
1038
- # is way slower.
1039
- SetOption ("disable_execute_ninja" , True )
1040
-
1041
1040
# Threads
1042
1041
if env ["threads" ]:
1043
1042
env .Append (CPPDEFINES = ["THREADS_ENABLED" ])
0 commit comments