Skip to content

Commit

Permalink
Stop handling "define" and "undef" when condition fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Nov 20, 2018
1 parent 037c873 commit 04bf778
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/SCons/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def start_handling_includes(self, t=None):
d = self.dispatch_table
p = self.stack[-1] if self.stack else self.default_table

for k in ('import', 'include', 'include_next'):
for k in ('import', 'include', 'include_next', 'define', 'undef'):
d[k] = p[k]

def stop_handling_includes(self, t=None):
Expand All @@ -463,6 +463,8 @@ def stop_handling_includes(self, t=None):
d['import'] = self.do_nothing
d['include'] = self.do_nothing
d['include_next'] = self.do_nothing
d['define'] = self.do_nothing
d['undef'] = self.do_nothing

# Default methods for handling all of the preprocessor directives.
# (Note that what actually gets called for a given directive at any
Expand Down

0 comments on commit 04bf778

Please sign in to comment.