summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2026-04-23 01:29:29 +0200
committerGitHub <noreply@github.com>2026-04-22 17:29:29 -0600
commit3a5af8ff76efad60cb193670ff1ad8fd22ac47f0 (patch)
tree59456af945cd1eef0bf13e558513395f83d886a8
parentd2febf46035d4da32e969b577102ec6bcd4d5c12 (diff)
Update CMakeLists.txt (#695)
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
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("$<$<COMPILE_LANGUAGE:C>:-Wno-error=incompatible-pointer-types>" "$<$<COMPILE_LANGUAGE:CXX>:-Wno-error=narrowing>")
+
+if(HAS_WNO_ERROR_INT_CONVERSION)
+ add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wno-error=int-conversion>")
+endif()
+
+if(HAS_WNO_ERROR_CHANGES_MEANING)
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wno-error=changes-meaning>")
+endif()
+
# Add compile definitions for the target
add_compile_definitions(
VERSION_US=1