mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Turn on -Wextra
Add -Wextra and silence all warnings with -Wno-*. Among them, we probably
want to fix
-Wunused-variable
-Wunused-but-set-variable
-Wtype-limits
at some point.
This commit is contained in:
+9
-1
@@ -25,10 +25,18 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
||||
set(warning_flags
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-unused
|
||||
-Wno-unused-variable
|
||||
-Wno-type-limits
|
||||
-Wno-unused-parameter
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-unknown-pragmas
|
||||
-Wno-reorder)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
list(APPEND warning_flags -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" " " warning_flags "${warning_flags}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warning_flags}")
|
||||
endif()
|
||||
|
||||
@@ -134,6 +134,11 @@ if(UNIX)
|
||||
list(APPEND sources os/linux/linux_libentry.cpp)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set_source_files_properties(3rdparty/tinyexr/tinyexr.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-extra -Wno-unused-function")
|
||||
endif()
|
||||
|
||||
add_library(rdoc OBJECT ${sources})
|
||||
target_compile_definitions(rdoc ${RDOC_DEFINITIONS})
|
||||
target_include_directories(rdoc ${RDOC_INCLUDES})
|
||||
|
||||
Reference in New Issue
Block a user