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
This commit is contained in:
Seth Hillbrand
2026-02-02 21:53:25 -08:00
parent 921d86d7d6
commit 382e141db5
+7
View File
@@ -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 )