mirror of
https://github.com/gbdev/rgbds.git
synced 2026-03-27 15:23:04 +00:00
Avoid passing a C++-only flag when compiling C files
Avoids compiler warnings. This can happen because zlib and libpng are both C projects, and we build them from source if they are unavailable.
This commit is contained in:
@@ -53,7 +53,7 @@ if(MSVC)
|
||||
add_compile_options(/fsanitize=address) # Note that this shouldn't be passed to the linker.
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(-Wall -pedantic -fno-exceptions -fno-rtti -Wno-unknown-warning-option
|
||||
add_compile_options(-Wall -pedantic -fno-exceptions $<$<COMPILE_LANGUAGE:CXX>:-fno-rtti> -Wno-unknown-warning-option
|
||||
# C++20 allows macros to take zero variadic arguments.
|
||||
# Some versions of Clang don't recognize this, and treat them as a GNU extension.
|
||||
-Wno-gnu-zero-variadic-macro-arguments)
|
||||
|
||||
Reference in New Issue
Block a user