%scons; %builders-mod; %functions-mod; %tools-mod; %variables-mod; ]> Sets up the &b-link-Ninja; builder, which generates a &ninja; build file, and then optionally runs &ninja;. This is an experimental feature. This functionality is subject to change and/or removal without a deprecation cycle. NINJA_DISABLE_AUTO_RUN NINJA_ALIAS_NAME NINJA_DIR NINJA_COMPDB_EXPAND NINJA_ENV_VAR_CACHE NINJA_FILE_NAME NINJA_GENERATED_SOURCE_SUFFIXES NINJA_GENERATED_SOURCE_ALIAS_NAME NINJA_MSVC_DEPS_PREFIX NINJA_DEPFILE_PARSE_FORMAT NINJA_POOL NINJA_REGENERATE_DEPS NINJA_SYNTAX NINJA_FORCE_SCONS_BUILD _NINJA_REGENERATE_DEPS_FUNC IMPLICIT_COMMAND_DEPENDENCIES NINJA_SCONS_DAEMON_KEEP_ALIVE NINJA_SCONS_DAEMON_PORT NINJA_CMD_ARGS AR ARCOM ARFLAGS CC CCCOM CCDEPFLAGS CCFLAGS CXX CXXCOM ESCAPE LINK LINKCOM PLATFORM RANLIB RANLIBCOM SHCCCOM SHCXXCOM SHLINK SHLINKCOM PROGSUFFIX PRINT_CMD_LINE_FUNC A special builder which adds a target to create a Ninja build file. The builder does not require any source files to be specified. This is an experimental feature. To enable it you must use one of the following methods # On the command line --experimental=ninja # Or in your SConstruct SetOption('experimental', 'ninja') This functionality is subject to change and/or removal without deprecation cycle. To use this tool you need to install the &Python; &ninja; package, as the tool by default depends on being able to do an import of the package This can be done via: python -m pip install ninja If called with no arguments, the builder will default to a target name of ninja.build. If called with a single positional argument, &scons; will "deduce" the target name from that source argument, giving it the same name, and then ignore the source. This is the usual way to call the builder if a non-default target name is wanted. If called with either the target= or source= keyword arguments, the value of the argument is taken as the target name. If called with both, the target= value is used and source= is ignored. If called with multiple sources, the source list will be ignored, since there is no way to deduce what the intent was; in this case the default target name will be used. Available since &scons; 4.2. The list of source file suffixes which are generated by &SCons; build steps. All source files which match these suffixes will be added to the _generated_sources alias in the output &ninja; build file. Then all other source files will be made to depend on this in the &ninja; build file, forcing the generated sources to be built first. A string matching the name of a user defined alias which represents a list of all generated sources. This will prevent the auto-detection of generated sources from &cv-NINJA_GENERATED_SOURCE_SUFFIXES;. Then all other source files will be made to depend on this in the &ninja; build file, forcing the generated sources to be built first. The msvc_deps_prefix string. Propagates directly into the generated &ninja; build file. From Ninja's docs: defines the string which should be stripped from msvc's output Determines the type of format ninja should expect when parsing header include depfiles. Can be , , or . The option corresponds to format, and or correspond to . The builddir value. Propagates directly into the generated &ninja; build file. From Ninja's docs: A directory for some Ninja output files. ... (You can also store other build output in this directory.) The default value is .ninja. A generator function used to create a &ninja; depfile which includes all the files which would require &SCons; to be invoked if they change. Or a list of said files. Boolean value to instruct &ninja; to expand the command line arguments normally put into response files. If true, prevents unexpanded lines in the compilation database like gcc @rsp_file and instead yields expanded lines like gcc -c -o myfile.o myfile.c -Ia -DXYZ. Ninja's compdb tool added the flag in Ninja V1.9.0 A string that sets the environment for any environment variables that differ between the OS environment and the &SCons; execution environment. It will be compatible with the default shell of the operating system. If not explicitly set, &SCons; will generate this dynamically from the execution environment stored in the current &consenv; (e.g. env['ENV']) where those values differ from the existing shell.. Set the ninja_pool for this or all targets in scope for this env var. Boolean. Default: False. If true, &SCons; will not run &ninja; automatically after creating the &ninja; build file. If not explicitly set, this will be set to True if or SetOption('disable_execute_ninja', True) is seen. The filename for the generated Ninja build file. The default is ninja.build. The name of the alias target which will cause &SCons; to create the &ninja; build file, and then (optionally) run &ninja;. The default value is generate-ninja. The path to a custom ninja_syntax.py file which is used in generation. The tool currently assumes you have &ninja; installed as a &Python; module and grabs the syntax file from that installation if &cv-NINJA_SYNTAX; is not explicitly set. If true, causes the build nodes to callback to scons instead of using &ninja; to build them. This is intended to be passed to the environment on the builder invocation. It is useful if you have a build node which does something which is not easily translated into &ninja;. Internal value used to specify the function to call with argument env to generate the list of files which if changed would require the &ninja; build file to be regenerated. The number of seconds for the SCons deamon launched by ninja to stay alive. (Default: 180000) The TCP/IP port for the SCons daemon to listen on. NOTE: You cannot use a port already being listened to on your build machine. (Default: random number between 10000,60000) A string which will pass arguments through SCons to the ninja command when scons executes ninja. Has no effect if &cv-NINJA_DISABLE_AUTO_RUN; is set. This value can also be passed on the command line: scons NINJA_CMD_ARGS=-v or scons NINJA_CMD_ARGS="-v -j 3"