Build: fix Xcode warnings related to integer conversion

Xcode enables additional warning flags by default. Disable some to match
command line build and other platforms more closely.

Ref #111193
This commit is contained in:
Brecht Van Lommel 2023-08-17 15:54:04 +02:00
parent b454fc2161
commit a5789eba98
1 changed files with 6 additions and 0 deletions

View File

@ -1973,6 +1973,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
unset(_WARNINGS)
endif()
# Xcode enables additional warning flags by default. Disable some to match
# command line build and other platforms more closely.
if(XCODE)
set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_64_TO_32_BIT_CONVERSION NO)
endif()
# ensure python header is found since detection can fail, this could happen
# with _any_ library but since we used a fixed python version this tends to
# be most problematic.