https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa7ab16fd09cb1637562d…
commit aa7ab16fd09cb1637562dc66248b6fb40ebc53fc
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Fri Nov 29 15:05:56 2024 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Tue Jan 14 13:34:24 2025 +0200
[CMAKE] Disable a number of warnings for clang
Also remove the totally useless and stupid -Werror=unknown-warning-option
---
sdk/cmake/gcc.cmake | 26 +++++++++++++-------------
sdk/cmake/msvc.cmake | 16 ++++++++++++++--
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 860594ef38d..1c994e2c51d 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -115,22 +115,22 @@ add_compile_options(-march=${OARCH} -mtune=${TUNE})
# Warnings, errors
if((NOT CMAKE_BUILD_TYPE STREQUAL "Release") AND (NOT CMAKE_C_COMPILER_ID
STREQUAL Clang))
add_compile_options(-Werror)
-else()
- if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
-
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror=unknown-warning-option>)
- endif()
endif()
add_compile_options(-Wall -Wpointer-arith)
-add_compile_options(-Wno-char-subscripts -Wno-multichar -Wno-unused-value)
-add_compile_options(-Wno-unused-const-variable)
-add_compile_options(-Wno-unused-local-typedefs)
-add_compile_options(-Wno-deprecated)
-add_compile_options(-Wno-unused-result) # FIXME To be removed when CORE-17637 is
resolved
-
-if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
- add_compile_options(-Wno-maybe-uninitialized)
-endif()
+
+# Disable some overzealous warnings
+add_compile_options(
+ -Wno-unknown-warning-option
+ -Wno-char-subscripts
+ -Wno-multichar
+ -Wno-unused-value
+ -Wno-unused-const-variable
+ -Wno-unused-local-typedefs
+ -Wno-deprecated
+ -Wno-unused-result # FIXME To be removed when CORE-17637 is resolved
+ -Wno-maybe-uninitialized
+)
if(ARCH STREQUAL "amd64")
add_compile_options(-Wno-format)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index bf804dd3bfd..eb4973914e0 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -147,8 +147,20 @@ endif()
add_compile_options(/w14115)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
-
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror=unknown-warning-option>)
-
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:-nostdinc;-Wno-multichar;-Wno-char-subscripts;-Wno-microsoft-enum-forward-reference;-Wno-pragma-pack;-Wno-microsoft-anon-tag;-Wno-parentheses-equality;-Wno-unknown-pragmas>")
+ add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:-nostdinc>")
+ add_compile_options(
+ -Wno-unknown-warning-option
+ -Wno-multichar
+ -Wno-char-subscripts
+ -Wno-microsoft-enum-forward-reference
+ -Wno-pragma-pack
+ -Wno-microsoft-anon-tag
+ -Wno-parentheses-equality
+ -Wno-unknown-pragmas
+ -Wno-ignored-pragmas
+ -Wno-ignored-pragma-intrinsic
+ -Wno-microsoft-exception-spec
+ )
endif()
# Debugging