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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user