mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Build with pedantically standard C++ (#1309)
* Remove array designators (not standard C++) * Build with pedantically standard C++
This commit is contained in:
@@ -33,10 +33,11 @@ if(MSVC)
|
||||
add_link_options(${SAN_FLAGS})
|
||||
endif()
|
||||
else()
|
||||
# TODO: use -pedantic after non-C++ idioms are gone
|
||||
add_compile_options(-Wall)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(-Wno-c99-designator)
|
||||
add_compile_options(-Wall -pedantic)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# C++20 allows macros to take zero variadic arguments, but Clang (aka AppleClang on macOS)
|
||||
# does not recognize this yet.
|
||||
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
|
||||
endif()
|
||||
add_definitions(-D_POSIX_C_SOURCE=200809L)
|
||||
if(SANITIZERS)
|
||||
|
||||
Reference in New Issue
Block a user