From 6ae4e88475c9bd9ac111713d3cb925a54f9e1f40 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 25 Oct 2023 06:47:09 +0200 Subject: [PATCH] cmake: fix Xcode generator build --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1dc6942..4822823d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -291,6 +291,10 @@ function(upx_compile_source_debug_with_O2) endif() set(flags "-O2") 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}) if(MSVC_FRONTEND) # MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2