Commit 05cc9e37649a6e522a98a810bd5865e3bfcd546d

Ozkan Sezer 2021-03-04T18:40:50

CMake: move GCC check after CLANG, so that CLANG is properly recognized from a patchset by Vladislav Dmitrievich Turbanov: https://github.com/libsdl-org/SDL/pull/4062

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1a4ad1..a134ce3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,12 +191,12 @@ else()
 endif()
 
 # Compiler info
-if(CMAKE_COMPILER_IS_GNUCC)
-  set(USE_GCC TRUE)
-  set(OPT_DEF_ASM TRUE)
-elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
+if(CMAKE_C_COMPILER_ID MATCHES "Clang")
   set(USE_CLANG TRUE)
   set(OPT_DEF_ASM TRUE)
+elseif(CMAKE_COMPILER_IS_GNUCC)
+  set(USE_GCC TRUE)
+  set(OPT_DEF_ASM TRUE)
 elseif(MSVC_VERSION GREATER 1400) # VisualStudio 8.0+
   set(OPT_DEF_ASM TRUE)
   #set(CMAKE_C_FLAGS "/ZI /WX- /