Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
build: add configure option to build with ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
tjfontaine authored and bnoordhuis committed Sep 4, 2012
1 parent 2efa3ae commit d3135e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion configure
Expand Up @@ -165,6 +165,11 @@ parser.add_option("--with-arm-float-abi",
help="Specifies which floating-point ABI to use. Valid values are: "
"soft, softfp, hard")

parser.add_option("--ninja",
action="store_true",
dest="ninja_build",
help="Generate files for the ninja build system")

(options, args) = parser.parse_args()


Expand Down Expand Up @@ -457,7 +462,9 @@ write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
write('config.mk', "# Do not edit. Generated by the configure script.\n" +
("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release')))

if os.name == 'nt':
if options.ninja_build:
gyp_args = ['-f', 'ninja']
elif os.name == 'nt':
gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010']
else:
gyp_args = ['-f', 'make']
Expand Down
3 changes: 1 addition & 2 deletions tools/gyp_node
Expand Up @@ -44,8 +44,7 @@ if __name__ == '__main__':
args.append('--depth=' + node_root)

# There's a bug with windows which doesn't allow this feature.
if sys.platform != 'win32':

if sys.platform != 'win32' and 'ninja' not in args:
# Tell gyp to write the Makefiles into output_dir
args.extend(['--generator-output', output_dir])

Expand Down

0 comments on commit d3135e0

Please sign in to comment.