소스 검색

CMake: Replace CMAKE_COMPILER_IS_GNUCC with CMAKE_C_COMPILER_ID

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.
Peter Kokot 1 개월 전
부모
커밋
25aa1c643f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      cmake/sdlcompilers.cmake

+ 1 - 1
cmake/sdlcompilers.cmake

@@ -11,7 +11,7 @@ macro(SDL_DetectCompiler)
     if(MSVC)
     if(MSVC)
       set(MSVC_CLANG TRUE)
       set(MSVC_CLANG TRUE)
     endif()
     endif()
-  elseif(CMAKE_COMPILER_IS_GNUCC)
+  elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
     set(USE_GCC TRUE)
     set(USE_GCC TRUE)
   elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
   elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
     set(USE_INTELCC TRUE)
     set(USE_INTELCC TRUE)