Skip to content
This repository
Browse code

build: add configure option to build with ninja

  • Loading branch information...
commit d3135e0f57ffece13c70160606250006cd097c17 1 parent 2efa3ae
Timothy J Fontaine authored August 22, 2012 bnoordhuis committed September 04, 2012

Showing 2 changed files with 9 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  configure
  2. 3  tools/gyp_node
9  configure
@@ -165,6 +165,11 @@ parser.add_option("--with-arm-float-abi",
165 165
     help="Specifies which floating-point ABI to use. Valid values are: "
166 166
          "soft, softfp, hard")
167 167
 
  168
+parser.add_option("--ninja",
  169
+    action="store_true",
  170
+    dest="ninja_build",
  171
+    help="Generate files for the ninja build system")
  172
+
168 173
 (options, args) = parser.parse_args()
169 174
 
170 175
 
@@ -457,7 +462,9 @@ write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
457 462
 write('config.mk', "# Do not edit. Generated by the configure script.\n" +
458 463
   ("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release')))
459 464
 
460  
-if os.name == 'nt':
  465
+if options.ninja_build:
  466
+  gyp_args = ['-f', 'ninja']
  467
+elif os.name == 'nt':
461 468
   gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010']
462 469
 else:
463 470
   gyp_args = ['-f', 'make']
3  tools/gyp_node
@@ -44,8 +44,7 @@ if __name__ == '__main__':
44 44
   args.append('--depth=' + node_root)
45 45
 
46 46
   # There's a bug with windows which doesn't allow this feature.
47  
-  if sys.platform != 'win32':
48  
-
  47
+  if sys.platform != 'win32' and 'ninja' not in args:
49 48
     # Tell gyp to write the Makefiles into output_dir
50 49
     args.extend(['--generator-output', output_dir])
51 50
 

0 notes on commit d3135e0

Please sign in to comment.
Something went wrong with that request. Please try again.