cmake: fix Xcode generator build

This commit is contained in:
Markus F.X.J. Oberhumer
2023-10-25 06:47:09 +02:00
parent facabd68d7
commit 6ae4e88475
+4
View File
@@ -291,6 +291,10 @@ function(upx_compile_source_debug_with_O2)
endif() endif()
set(flags "-O2") set(flags "-O2")
endif() endif()
if(CMAKE_GENERATOR MATCHES "Xcode") # multi-config
# NOTE: Xcode does not support per-config per-source COMPILE_FLAGS (as of CMake 3.27.7)
return()
endif()
foreach(t ${ARGV}) foreach(t ${ARGV})
if(MSVC_FRONTEND) if(MSVC_FRONTEND)
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2 # MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2