From 382e141db589d27cabe86c5f59fbae074204cb46 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 2 Feb 2026 21:53:25 -0800 Subject: [PATCH] Add more Linux warnings MSVC is all bend out of shape about wxString conversions so it will help to get the warnings on Linux as well. Only works for Clang right now --- cmake/Warnings.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/Warnings.cmake b/cmake/Warnings.cmake index 903d8d2a95..cb7332e1e8 100644 --- a/cmake/Warnings.cmake +++ b/cmake/Warnings.cmake @@ -188,6 +188,13 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( HAVE_WIMPLICIT_FLOAT_CONVERSION true ) endif() + CHECK_CXX_COMPILER_FLAG( "-Wambiguous-conditional" COMPILER_SUPPORTS_WAMBIGUOUS_CONDITIONAL ) + + # Add this to match MSVC's warning about ambiguous conditionals + if( COMPILER_SUPPORTS_WAMBIGUOUS_CONDITIONAL ) + set( WARN_FLAGS_CXX "${WARN_FLAGS_CXX} -Wambiguous-conditional" ) + endif() + # See if the compiler will throw warnings on these conversions CHECK_CXX_COMPILER_FLAG( "-Wunused-const-variable" COMPILER_SUPPORTS_WUNUSED_CONST_VARIABLE )