Add --no-scm configure option to bypass SCM detection

This commit is contained in:
Enrico Tröger 2014-04-13 10:43:55 +02:00
parent 6fce95cb10
commit 9f294c25c3

View File

@ -313,6 +313,9 @@ def options(opt):
opt.load('compiler_cxx')
opt.load('intltool')
# Option
opt.add_option('--no-scm', action='store_true', default=False,
help='Disable SCM detection [default: No]', dest='no_scm')
# Features
opt.add_option('--disable-plugins', action='store_true', default=False,
help='compile without plugin support [default: No]', dest='no_plugins')
@ -714,6 +717,9 @@ def _define_from_opt(conf, define_name, opt_value, default_value, quote=1):
def _get_git_rev(conf):
if conf.options.no_scm:
return
if not os.path.isdir('.git'):
return