mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-14 16:58:34 +00:00
Enable all gcc and clang warnings for testing the CI
This commit is contained in:
parent
0183545f02
commit
3b3190671f
1 changed files with 28 additions and 0 deletions
|
@ -34,6 +34,34 @@ if (CMAKE_VERSION VERSION_LESS "3.21")
|
|||
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL)
|
||||
endif()
|
||||
|
||||
# Set warning flags for gcc and clang
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wpedantic
|
||||
-Wconversion
|
||||
-Wsign-conversion
|
||||
-Wshadow
|
||||
-Wnull-dereference
|
||||
-Wdouble-promotion
|
||||
-Wformat=2
|
||||
-Wimplicit-fallthrough
|
||||
-Wundef
|
||||
-Wcast-align
|
||||
-Woverloaded-virtual
|
||||
-Wnon-virtual-dtor
|
||||
-Wstrict-overflow=5
|
||||
-Wuseless-cast
|
||||
-Wduplicated-cond
|
||||
-Wduplicated-branches
|
||||
-Wlogical-op
|
||||
-Wredundant-decls
|
||||
-Wstrict-null-sentinel
|
||||
-Wold-style-cast")
|
||||
message(STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS})
|
||||
endif()
|
||||
|
||||
option(VMA_ENABLE_INSTALL "Install VulkanMemoryAllocator" ${PROJECT_IS_TOP_LEVEL})
|
||||
if (VMA_ENABLE_INSTALL)
|
||||
include(GNUInstallDirs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue