diff --git a/CMakeLists.txt b/CMakeLists.txt index dbe1c92dc..b41f33aa8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt index 15f2d3b88..f8f5b6af8 100644 --- a/renderdoc/CMakeLists.txt +++ b/renderdoc/CMakeLists.txt @@ -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})