From 3a5af8ff76efad60cb193670ff1ad8fd22ac47f0 Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Thu, 23 Apr 2026 01:29:29 +0200 Subject: [PATCH] Update CMakeLists.txt (#695) --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88fbca52c..4ba126c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,6 +186,21 @@ set(SKIP_XCODE_VERSION_CHECK ON) # TODO: Sorry i broke this set(GFX_DEBUG_DISASSEMBLER OFF) +include(CheckCCompilerFlag) +include(CheckCXXCompilerFlag) +check_c_compiler_flag("-Wno-error=int-conversion" HAS_WNO_ERROR_INT_CONVERSION) +check_cxx_compiler_flag("-Wno-error=changes-meaning" HAS_WNO_ERROR_CHANGES_MEANING) + +add_compile_options("$<$:-Wno-error=incompatible-pointer-types>" "$<$:-Wno-error=narrowing>") + +if(HAS_WNO_ERROR_INT_CONVERSION) + add_compile_options("$<$:-Wno-error=int-conversion>") +endif() + +if(HAS_WNO_ERROR_CHANGES_MEANING) + add_compile_options("$<$:-Wno-error=changes-meaning>") +endif() + # Add compile definitions for the target add_compile_definitions( VERSION_US=1