mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[SCons] Allow compiler options which contain commas
Compiler options such as '-Wl,-z,rlero' were incorrectly being split into multiple options by SCons. Compiler options must now be separated by spaces when specified on the SCons command line. Fixes #320
This commit is contained in:
@@ -459,7 +459,8 @@ config_options = [
|
||||
'LD_LIBRARY_PATH,HOME'.""",
|
||||
defaults.env_vars),
|
||||
('cxx_flags',
|
||||
'Compiler flags passed to the C++ compiler only.',
|
||||
"""Compiler flags passed to the C++ compiler only. Separate multiple
|
||||
options with spaces, e.g. cxx_flags='-g -Wextra -O3 --std=c++11'""",
|
||||
defaults.cxxFlags),
|
||||
('cc_flags',
|
||||
'Compiler flags passed to both the C and C++ compilers, regardless of optimization level',
|
||||
|
||||
@@ -511,11 +511,11 @@ def formatOption(env, opt):
|
||||
|
||||
def listify(value):
|
||||
"""
|
||||
Convert an option specified as a string to a list. Allow both
|
||||
comma and space as delimiters. Passes lists transparently.
|
||||
Convert an option specified as a string to a list, using spaces as
|
||||
delimiters. Passes lists transparently.
|
||||
"""
|
||||
if isinstance(value, types.StringTypes):
|
||||
return value.replace(',', ' ').split()
|
||||
return value.split()
|
||||
else:
|
||||
# Already a sequence. Return as a list
|
||||
return list(value)
|
||||
|
||||
Reference in New Issue
Block a user