remove "config: custom" option; fixes #135

This commit is contained in:
Radovan Bast
2015-09-18 11:25:50 +02:00
parent 27f4b88220
commit 84b330e419
5 changed files with 7 additions and 42 deletions

View File

@ -285,19 +285,13 @@ def fetch_modules(config, relative_path):
sys.stderr.write("ERROR: %s does not exist\n" % src)
sys.exit(-1)
# unless config is 'custom' we infer configuration
# from the module documentation
parse_doc = True
if config.has_option(section, 'config'):
if config.get(section, 'config') == 'custom':
parse_doc = False
if parse_doc:
with open(file_name, 'r') as f:
config_docopt, config_define, config_export, config_fetch = parse_cmake_module(f.read())
config = prepend_or_set(config, section, 'docopt', config_docopt)
config = prepend_or_set(config, section, 'define', config_define)
config = prepend_or_set(config, section, 'export', config_export)
config = prepend_or_set(config, section, 'fetch', config_fetch)
# we infer config from the module documentation
with open(file_name, 'r') as f:
config_docopt, config_define, config_export, config_fetch = parse_cmake_module(f.read())
config = prepend_or_set(config, section, 'docopt', config_docopt)
config = prepend_or_set(config, section, 'define', config_define)
config = prepend_or_set(config, section, 'export', config_export)
config = prepend_or_set(config, section, 'fetch', config_fetch)
modules.append(Module(path=path, name=name))
i += 1
print_progress_bar(