WAF: allow NS-3 modules to compile pure C code sources mixed with the C++ ones
This commit is contained in:
1 parent
e862ad7ede
commit
414b7bd4e2
2 files changed
+10
-1
No files matched your search
@@ -112,6 +112,7 @@ def dist_hook():
|
||||
|
||||
def set_options(opt):
|
||||
# options provided by the modules
|
||||
opt.tool_options('compiler_cc')
|
||||
opt.tool_options('compiler_cxx')
|
||||
opt.tool_options('cflags')
|
||||
|
||||
@@ -236,6 +237,7 @@ def configure(conf):
|
||||
conf.env['NS3_OPTIONAL_FEATURES'] = []
|
||||
|
||||
conf.env['NS3_BUILDDIR'] = conf.blddir
|
||||
conf.check_tool('compiler_cc')
|
||||
conf.check_tool('compiler_cxx')
|
||||
conf.check_tool('cflags')
|
||||
try:
|
||||
@@ -388,6 +390,10 @@ def configure(conf):
|
||||
conf.env.append_value('CXXDEFINES', "ENABLE_GSL")
|
||||
conf.env.append_value('CCDEFINES', "ENABLE_GSL")
|
||||
|
||||
# for compiling C code, copy over the CXX* flags
|
||||
conf.env.append_value('CCFLAGS', conf.env['CXXFLAGS'])
|
||||
conf.env.append_value('CCDEFINES', conf.env['CXXDEFINES'])
|
||||
|
||||
# append user defined flags after all our ones
|
||||
for (confvar, envvar) in [['CCFLAGS', 'CCFLAGS_EXTRA'],
|
||||
['CXXFLAGS', 'CXXFLAGS_EXTRA'],
|
||||
|
||||
Reference in new issue
Block a user