CMake: Replace CMAKE_COMPILER_IS_GNUCC with CMAKE_C_COMPILER_ID
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled

CMAKE_COMPILER_IS_GNUCC is obsolete variable and can be replaced with
CMAKE_C_COMPILER_ID (also available since early CMake versions).

In the past CMake versions also LCC and QCC compilers had this varible
set to boolean true but these aren't relevant here.

(cherry picked from commit 25aa1c643f)
This commit is contained in:
Peter Kokot
2026-04-04 15:24:05 +02:00
committed by Sam Lantinga
parent ce3cc80aca
commit 4bc27ad15e
+1 -1
View File
@@ -11,7 +11,7 @@ macro(SDL_DetectCompiler)
if(MSVC)
set(MSVC_CLANG TRUE)
endif()
elseif(CMAKE_COMPILER_IS_GNUCC)
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(USE_GCC TRUE)
elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
set(USE_INTELCC TRUE)