Update CMakeLists.txt (#695)

This commit is contained in:
coco875
2026-04-23 01:29:29 +02:00
committed by GitHub
parent d2febf4603
commit 3a5af8ff76
+15
View File
@@ -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