remove "config: custom" option; fixes #135
This commit is contained in:
parent
27f4b88220
commit
84b330e419
@ -1,17 +0,0 @@
|
||||
[project]
|
||||
name: example
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
config: custom
|
||||
docopt: --cxx=<CXX> C++ compiler [default: g++].
|
||||
--extra-cxx-flags=<EXTRA_CXXFLAGS> Extra C++ compiler flags [default: ''].
|
||||
export: 'CXX=%s' % arguments['--cxx']
|
||||
define: '-DEXTRA_CXXFLAGS="%s"' % arguments['--extra-cxx-flags']
|
||||
|
||||
[default_build_paths]
|
||||
source: ../../../modules/default_build_paths.cmake
|
||||
|
||||
[src]
|
||||
source: ../../../modules/src.cmake
|
@ -1 +0,0 @@
|
||||
add_executable(example example.cpp)
|
@ -1,7 +0,0 @@
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "PASSED";
|
||||
return 0;
|
||||
}
|
@ -93,10 +93,6 @@ def configure_build_and_exe(name, setup_command, launcher=None):
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_cxx_custom():
|
||||
configure_build_and_exe('cxx_custom', 'python setup.py --cxx=g++')
|
||||
|
||||
|
||||
def test_extra_cmake_options():
|
||||
configure_build_and_exe('extra_cmake_options', 'python setup.py --cxx=g++ --cmake-options="-DENABLE_SOMETHING=OFF -DENABLE_FOO=ON"')
|
||||
|
||||
|
20
update.py
20
update.py
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user