summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-09-27 17:42:43 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-09-27 17:42:43 -0500
commitdcd64a67823b2f53cc2e28fe74d5ab2cbcf4e60c (patch)
tree443e444335e5417be1a29911a9bc1d46ffad262e /acprep
parenta9bd40a1e3959c35f5c72e70825594675b23446c (diff)
downloadfork-ledger-dcd64a67823b2f53cc2e28fe74d5ab2cbcf4e60c.tar.gz
fork-ledger-dcd64a67823b2f53cc2e28fe74d5ab2cbcf4e60c.tar.bz2
fork-ledger-dcd64a67823b2f53cc2e28fe74d5ab2cbcf4e60c.zip
Added -N/--ninja option to acprep
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep10
1 files changed, 8 insertions, 2 deletions
diff --git a/acprep b/acprep
index ebf776db..26f8d8b2 100755
--- a/acprep
+++ b/acprep
@@ -300,6 +300,9 @@ class PrepareBuild(CommandLineApp):
action="store", dest="compiler",
help='Use the Clang C++ compiler')
+ op.add_option('-N', '--ninja', action='store_true', dest='use_ninja',
+ default=False,
+ help='Use ninja to build, rather than make')
op.add_option('', '--no-git', action='store_true', dest='no_git',
default=False,
help='Do not call out to Git; useful for offline builds')
@@ -657,7 +660,6 @@ class PrepareBuild(CommandLineApp):
#########################################################################
def setup_for_johnw(self):
- self.configure_args.append('-GNinja')
self.configure_args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON')
if not self.options.compiler:
@@ -690,6 +692,9 @@ class PrepareBuild(CommandLineApp):
if self.options.no_python:
self.configure_args.remove('-DUSE_PYTHON=1')
+ if self.options.use_ninja:
+ self.configure_args.append('-GNinja')
+
if exists('/Users/johnw/Projects/ledger/plan/TODO'):
self.setup_for_johnw()
@@ -897,7 +902,8 @@ class PrepareBuild(CommandLineApp):
self.log.debug('Changing directory to ' + build_dir)
os.chdir(build_dir)
- self.execute(*(['make'] + make_args))
+ self.execute(*(['ninja' if self.options.use_ninja else 'make'] +
+ make_args))
finally:
os.chdir(self.source_dir)