File tree 1 file changed +8
-4
lines changed 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -113,10 +113,14 @@ extension_data = {
113
113
if cpp.get_id() == ' msvc'
114
114
# This flag fixes some bugs with the macro processing, namely
115
115
# https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-170#macro-arguments-are-unpacked
116
- # It was added in MSVC 2017 version 15.8, and deprecated for `/Zc:preprocessor` in
117
- # MSVC 2019 version 16.5, but we currently support any version of MSVC 2019 (vc142),
118
- # so we'll stick with the older flag.
119
- new_preprocessor = ' /experimental:preprocessor'
116
+ if cpp.has_argument(' /Zc:preprocessor' )
117
+ # This flag was added in MSVC 2019 version 16.5, which deprecated the one below.
118
+ new_preprocessor = ' /Zc:preprocessor'
119
+ else
120
+ # Since we currently support any version of MSVC 2019 (vc142), we'll stick with the
121
+ # older flag, added in MSVC 2017 version 15.8.
122
+ new_preprocessor = ' /experimental:preprocessor'
123
+ endif
120
124
else
121
125
new_preprocessor = []
122
126
endif
You can’t perform that action at this time.
0 commit comments