From 37beabd11c5999e38632151850fd564cc199261e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 6 Oct 2022 02:16:07 +0200 Subject: [PATCH] SDL_mslib.c: clang-cl does not support `/GL-` --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bad4e746..954c77a96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -739,10 +739,10 @@ if(MSVC) endif() endif() -if(MSVC) +if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") # Due to a limitation of Microsoft's LTO implementation, LTO must be disabled for memcpy and memset. # The same applies to various functions normally belonging in the C library (for x86 architecture). - set_property(SOURCE src/stdlib/SDL_mslibc.c APPEND PROPERTY COMPILE_FLAGS /GL-) + set_property(SOURCE src/stdlib/SDL_mslibc.c APPEND_STRING PROPERTY COMPILE_FLAGS " /GL-") endif() if(SDL_ASSEMBLY)