From 5aa35eba2037c5e4ed2ec4cbc8065193e9c70e94 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:27:25 -0800 Subject: [PATCH] Disable C++98 compatibility warnings for Clang builds (#8060) * Initial plan * Disable C++98 compatibility warnings for Clang to fix vcpkg build freeze Add -Wno-c++98-compat and -Wno-c++98-compat-pedantic flags to prevent excessive warning output when building with clang-cl or when -Weverything is enabled. These warnings are not useful for Z3 since it requires C++20. Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --- cmake/compiler_warnings.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/compiler_warnings.cmake b/cmake/compiler_warnings.cmake index d631ee11a..ddd96c047 100644 --- a/cmake/compiler_warnings.cmake +++ b/cmake/compiler_warnings.cmake @@ -6,7 +6,13 @@ set(GCC_AND_CLANG_WARNINGS "-Wall" ) set(GCC_ONLY_WARNINGS "") -set(CLANG_ONLY_WARNINGS "") +# Disable C++98 compatibility warnings to prevent excessive warning output +# when building with clang-cl or when -Weverything is enabled. +# These warnings are not useful for Z3 since it requires C++20. +set(CLANG_ONLY_WARNINGS + "-Wno-c++98-compat" + "-Wno-c++98-compat-pedantic" +) set(MSVC_WARNINGS "/W3") ################################################################################