cmake: set C std and enable pedantic warnings

see d262190faf and cd5946be73
This commit is contained in:
James R 2022-11-27 03:20:37 -08:00
parent 93aaa77de3
commit 63069ce710

View file

@ -5,6 +5,8 @@ if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows" AND
target_link_options(SRB2SDL2 PRIVATE "-static") target_link_options(SRB2SDL2 PRIVATE "-static")
endif() endif()
set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 11)
# Core sources # Core sources
target_sourcefile(c) target_sourcefile(c)
target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in) target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in)
@ -220,6 +222,7 @@ target_compile_options(SRB2SDL2 PRIVATE
-Wall -Wall
-Wno-trigraphs -Wno-trigraphs
-W # Was controlled by RELAXWARNINGS -W # Was controlled by RELAXWARNINGS
-pedantic
-Wfloat-equal -Wfloat-equal
-Wundef -Wundef
-Wpointer-arith -Wpointer-arith