Skip to content

Commit 8b690ef

Browse files
committed
Merge branch 'ft2font-improvements' into freethread
2 parents 5862914 + 0832ad6 commit 8b690ef

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/meson.build

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,14 @@ extension_data = {
113113
if cpp.get_id() == 'msvc'
114114
# This flag fixes some bugs with the macro processing, namely
115115
# 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
120124
else
121125
new_preprocessor = []
122126
endif

0 commit comments

Comments
 (0)