2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-16 23:19:50 +01:00

Experimental option env.merge_config_header

This new option writes 'defines' into the test files
during the configuration tests for c/c++. This may
provide more readable config.log files.
This commit is contained in:
Thomas Nagy 2015-11-07 23:02:49 +01:00
parent c2605e4dbb
commit 70be189ad2
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -607,6 +607,11 @@ def validate_c(self, kw):
if self.env[INCKEYS]:
kw['code'] = '\n'.join(['#include <%s>' % x for x in self.env[INCKEYS]]) + '\n' + kw['code']
# in case defines lead to very long command-lines
if kw.get('merge_config_header', False) or env.merge_config_header:
kw['code'] = '%s\n\n%s' % (self.get_config_header(), kw['code'])
env.DEFINES = [] # modify the copy
if not kw.get('success'): kw['success'] = None
if 'define_name' in kw: