1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-16 11:09:11 +00:00

Codechange: Use __VA_OPT__(,) instead of , ## (#12921)

`__VA_OPT__` is a C++20 standard, `##` is, apparently, a GNU extension.

MSVC needs /Zc:preprocessor adding for whatever reason.
This commit is contained in:
2024-09-12 07:06:15 +01:00
committed by GitHub
parent 7f5a3eaf83
commit ad5da0c924
5 changed files with 11 additions and 8 deletions

View File

@@ -8,6 +8,9 @@ macro(compile_flags)
# C++11 standard". We need C++11 for the way we use threads.
add_compile_options(/Zc:rvalueCast)
# Needed for __VA_OPT__() in macros.
add_compile_options(/Zc:preprocessor)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(
/MP # Enable multi-threaded compilation.