summaryrefslogtreecommitdiffstats
path: root/SCons/cpp.py
diff options
context:
space:
mode:
authorIvan Kravets <me@ikravets.com>2022-07-06 12:34:59 (GMT)
committerIvan Kravets <me@ikravets.com>2022-07-06 12:34:59 (GMT)
commitd9192dbf0c4380043759262147e6e06b0caf590e (patch)
treeba4d48a545d33202d07824a84eae5c46b707215d /SCons/cpp.py
parent07dc10b25b6169c9fb7e16dd78de8bb9ea107be6 (diff)
downloadSCons-d9192dbf0c4380043759262147e6e06b0caf590e.zip
SCons-d9192dbf0c4380043759262147e6e06b0caf590e.tar.gz
SCons-d9192dbf0c4380043759262147e6e06b0caf590e.tar.bz2
Conditional C/C++ Preprocessor: Strip shell's backslashes from the computed include (-DFOO_H=\"foo.h\")
Diffstat (limited to 'SCons/cpp.py')
-rw-r--r--SCons/cpp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/SCons/cpp.py b/SCons/cpp.py
index 353aa70..144f498 100644
--- a/SCons/cpp.py
+++ b/SCons/cpp.py
@@ -591,6 +591,9 @@ class PreProcessor:
while not s[0] in '<"':
try:
s = self.cpp_namespace[s]
+ # strip backslashes from the computed include (-DFOO_H=\"foo.h\")
+ for c in '<">':
+ s = s.replace(f"\\{c}", c)
except KeyError:
m = function_name.search(s)