cmake: add -Wall to CFLAGS for gcc and clang.

This commit is contained in:
Ozkan Sezer 2022-06-15 08:56:28 +03:00
parent cfbbb255a2
commit e32221a104
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ if(APPLE)
list(APPEND PHYSFS_M_SRCS src/physfs_platform_apple.m)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall)
# Don't use -rpath.
set(CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE)
endif()