Skip to content

Commit

Permalink
Updated compilers versions
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe committed Dec 27, 2023
1 parent 3b933d9 commit f573d23
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 26 deletions.
103 changes: 85 additions & 18 deletions glm/simd/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,23 @@
#define GLM_COMPILER_INTEL15 0x00100050
#define GLM_COMPILER_INTEL16 0x00100060
#define GLM_COMPILER_INTEL17 0x00100070
#define GLM_COMPILER_INTEL18 0x00100080
#define GLM_COMPILER_INTEL19 0x00100090
#define GLM_COMPILER_INTEL21 0x001000A0

// Visual C++ defines
#define GLM_COMPILER_VC 0x01000000
#define GLM_COMPILER_VC12 0x01000001
#define GLM_COMPILER_VC14 0x01000002
#define GLM_COMPILER_VC15 0x01000003
#define GLM_COMPILER_VC12 0x01000001 // Visual Studio 2013
#define GLM_COMPILER_VC14 0x01000002 // Visual Studio 2015
#define GLM_COMPILER_VC15 0x01000003 // Visual Studio 2017
#define GLM_COMPILER_VC15_3 0x01000004
#define GLM_COMPILER_VC15_5 0x01000005
#define GLM_COMPILER_VC15_6 0x01000006
#define GLM_COMPILER_VC15_7 0x01000007
#define GLM_COMPILER_VC15_8 0x01000008
#define GLM_COMPILER_VC15_9 0x01000009
#define GLM_COMPILER_VC16 0x0100000A
#define GLM_COMPILER_VC16 0x0100000A // Visual Studio 2019
#define GLM_COMPILER_VC17 0x0100000B // Visual Studio 2022

// GCC defines
#define GLM_COMPILER_GCC 0x02000000
Expand All @@ -75,13 +79,19 @@
#define GLM_COMPILER_GCC61 0x02000800
#define GLM_COMPILER_GCC7 0x02000400
#define GLM_COMPILER_GCC8 0x02000500
#define GLM_COMPILER_GCC9 0x02000600
#define GLM_COMPILER_GCC10 0x02000700
#define GLM_COMPILER_GCC11 0x02000800
#define GLM_COMPILER_GCC12 0x02000900
#define GLM_COMPILER_GCC13 0x02000A00
#define GLM_COMPILER_GCC14 0x02000B00

// CUDA
#define GLM_COMPILER_CUDA 0x10000000
#define GLM_COMPILER_CUDA75 0x10000001
#define GLM_COMPILER_CUDA80 0x10000002
#define GLM_COMPILER_CUDA90 0x10000004
#define GLM_COMPILER_CUDA_RTC 0x10000100
#define GLM_COMPILER_CUDA_RTC 0x10000100

// Clang
#define GLM_COMPILER_CLANG 0x20000000
Expand All @@ -91,9 +101,22 @@
#define GLM_COMPILER_CLANG37 0x20000080
#define GLM_COMPILER_CLANG38 0x20000090
#define GLM_COMPILER_CLANG39 0x200000A0
#define GLM_COMPILER_CLANG40 0x200000B0
#define GLM_COMPILER_CLANG41 0x200000C0
#define GLM_COMPILER_CLANG42 0x200000D0
#define GLM_COMPILER_CLANG4 0x200000B0
#define GLM_COMPILER_CLANG5 0x200000C0
#define GLM_COMPILER_CLANG6 0x200000D0
#define GLM_COMPILER_CLANG7 0x200000E0
#define GLM_COMPILER_CLANG8 0x200000F0
#define GLM_COMPILER_CLANG9 0x20000100
#define GLM_COMPILER_CLANG10 0x20000200
#define GLM_COMPILER_CLANG11 0x20000300
#define GLM_COMPILER_CLANG12 0x20000400
#define GLM_COMPILER_CLANG13 0x20000500
#define GLM_COMPILER_CLANG14 0x20000600
#define GLM_COMPILER_CLANG15 0x20000700
#define GLM_COMPILER_CLANG16 0x20000800
#define GLM_COMPILER_CLANG17 0x20000900
#define GLM_COMPILER_CLANG18 0x20000A00
#define GLM_COMPILER_CLANG19 0x20000B00

// HIP
#define GLM_COMPILER_HIP 0x40000000
Expand All @@ -107,7 +130,13 @@
# define GLM_COMPILER GLM_COMPILER_UNKNOWN

#elif defined(__INTEL_COMPILER)
# if __INTEL_COMPILER >= 1700
# if __INTEL_COMPILER >= 2021
# define GLM_COMPILER GLM_COMPILER_INTEL21
# elif __INTEL_COMPILER >= 1900
# define GLM_COMPILER GLM_COMPILER_INTEL19
# elif __INTEL_COMPILER >= 1800
# define GLM_COMPILER GLM_COMPILER_INTEL18
# elif __INTEL_COMPILER >= 1700
# define GLM_COMPILER GLM_COMPILER_INTEL17
# elif __INTEL_COMPILER >= 1600
# define GLM_COMPILER GLM_COMPILER_INTEL16
Expand Down Expand Up @@ -168,19 +197,45 @@
# elif __clang_major__ == 3 && __clang_minor__ >= 9
# define GLM_COMPILER GLM_COMPILER_CLANG39
# elif __clang_major__ == 4 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_CLANG40
# elif __clang_major__ == 4 && __clang_minor__ == 1
# define GLM_COMPILER GLM_COMPILER_CLANG41
# elif __clang_major__ == 4 && __clang_minor__ >= 2
# define GLM_COMPILER GLM_COMPILER_CLANG42
# elif __clang_major__ >= 4
# define GLM_COMPILER GLM_COMPILER_CLANG42
# define GLM_COMPILER GLM_COMPILER_CLANG4
# elif __clang_major__ == 5
# define GLM_COMPILER GLM_COMPILER_CLANG5
# elif __clang_major__ == 6
# define GLM_COMPILER GLM_COMPILER_CLANG6
# elif __clang_major__ == 7
# define GLM_COMPILER GLM_COMPILER_CLANG7
# elif __clang_major__ == 8
# define GLM_COMPILER GLM_COMPILER_CLANG8
# elif __clang_major__ == 9
# define GLM_COMPILER GLM_COMPILER_CLANG9
# elif __clang_major__ == 10
# define GLM_COMPILER GLM_COMPILER_CLANG10
# elif __clang_major__ == 11
# define GLM_COMPILER GLM_COMPILER_CLANG11
# elif __clang_major__ == 12
# define GLM_COMPILER GLM_COMPILER_CLANG12
# elif __clang_major__ == 13
# define GLM_COMPILER GLM_COMPILER_CLANG13
# elif __clang_major__ == 14
# define GLM_COMPILER GLM_COMPILER_CLANG14
# elif __clang_major__ == 15
# define GLM_COMPILER GLM_COMPILER_CLANG15
# elif __clang_major__ == 16
# define GLM_COMPILER GLM_COMPILER_CLANG16
# elif __clang_major__ == 17
# define GLM_COMPILER GLM_COMPILER_CLANG17
# elif __clang_major__ == 18
# define GLM_COMPILER GLM_COMPILER_CLANG18
# elif __clang_major__ >= 19
# define GLM_COMPILER GLM_COMPILER_CLANG19
# endif
# endif

// Visual C++
#elif defined(_MSC_VER)
# if _MSC_VER >= 1920
# if _MSC_VER >= 1930
# define GLM_COMPILER GLM_COMPILER_VC17
# elif _MSC_VER >= 1920
# define GLM_COMPILER GLM_COMPILER_VC16
# elif _MSC_VER >= 1916
# define GLM_COMPILER GLM_COMPILER_VC15_9
Expand All @@ -206,7 +261,19 @@

// G++
#elif defined(__GNUC__) || defined(__MINGW32__)
# if __GNUC__ >= 8
# if __GNUC__ >= 14
# define GLM_COMPILER GLM_COMPILER_GCC14
# elif __GNUC__ >= 13
# define GLM_COMPILER GLM_COMPILER_GCC13
# elif __GNUC__ >= 12
# define GLM_COMPILER GLM_COMPILER_GCC12
# elif __GNUC__ >= 11
# define GLM_COMPILER GLM_COMPILER_GCC11
# elif __GNUC__ >= 10
# define GLM_COMPILER GLM_COMPILER_GCC10
# elif __GNUC__ >= 9
# define GLM_COMPILER GLM_COMPILER_GCC9
# elif __GNUC__ >= 8
# define GLM_COMPILER GLM_COMPILER_GCC8
# elif __GNUC__ >= 7
# define GLM_COMPILER GLM_COMPILER_GCC7
Expand Down
85 changes: 77 additions & 8 deletions test/core/core_setup_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ int test_compiler()
case GLM_COMPILER_VC16:
std::printf("Visual C++ 16 - 2019\n");
break;
case GLM_COMPILER_VC17:
std::printf("Visual C++ 17 - 2022\n");
break;
default:
std::printf("Visual C++ version not detected\n");
Error += 1;
Expand Down Expand Up @@ -74,6 +77,24 @@ int test_compiler()
case GLM_COMPILER_GCC8:
std::printf("GCC 8\n");
break;
case GLM_COMPILER_GCC9:
std::printf("GCC 9\n");
break;
case GLM_COMPILER_GCC10:
std::printf("GCC 10\n");
break;
case GLM_COMPILER_GCC11:
std::printf("GCC 11\n");
break;
case GLM_COMPILER_GCC12:
std::printf("GCC 12\n");
break;
case GLM_COMPILER_GCC13:
std::printf("GCC 13\n");
break;
case GLM_COMPILER_GCC14:
std::printf("GCC 14\n");
break;
default:
std::printf("GCC version not detected\n");
Error += 1;
Expand Down Expand Up @@ -106,14 +127,53 @@ int test_compiler()
case GLM_COMPILER_CLANG39:
std::printf("Clang 3.9\n");
break;
case GLM_COMPILER_CLANG40:
std::printf("Clang 4.0\n");
case GLM_COMPILER_CLANG4:
std::printf("Clang 4\n");
break;
case GLM_COMPILER_CLANG5:
std::printf("Clang 5\n");
break;
case GLM_COMPILER_CLANG6:
std::printf("Clang 6\n");
break;
case GLM_COMPILER_CLANG7:
std::printf("Clang 7\n");
break;
case GLM_COMPILER_CLANG8:
std::printf("Clang 8\n");
break;
case GLM_COMPILER_CLANG9:
std::printf("Clang 9\n");
break;
case GLM_COMPILER_CLANG41:
std::printf("Clang 4.1\n");
case GLM_COMPILER_CLANG10:
std::printf("Clang 10\n");
break;
case GLM_COMPILER_CLANG42:
std::printf("Clang 4.2\n");
case GLM_COMPILER_CLANG11:
std::printf("Clang 11\n");
break;
case GLM_COMPILER_CLANG12:
std::printf("Clang 12\n");
break;
case GLM_COMPILER_CLANG13:
std::printf("Clang 13\n");
break;
case GLM_COMPILER_CLANG14:
std::printf("Clang 14\n");
break;
case GLM_COMPILER_CLANG15:
std::printf("Clang 15\n");
break;
case GLM_COMPILER_CLANG16:
std::printf("Clang 16\n");
break;
case GLM_COMPILER_CLANG17:
std::printf("Clang 17\n");
break;
case GLM_COMPILER_CLANG18:
std::printf("Clang 18\n");
break;
case GLM_COMPILER_CLANG19:
std::printf("Clang 19\n");
break;
default:
std::printf("LLVM version not detected\n");
Expand All @@ -131,10 +191,19 @@ int test_compiler()
std::printf("ICC 15 - 2015\n");
break;
case GLM_COMPILER_INTEL16:
std::printf("ICC 16 - 2017\n");
std::printf("ICC 16 - 2015\n");
break;
case GLM_COMPILER_INTEL17:
std::printf("ICC 17 - 20XX\n");
std::printf("ICC 17 - 2016\n");
break;
case GLM_COMPILER_INTEL18:
std::printf("ICC 18 - 2017\n");
break;
case GLM_COMPILER_INTEL19:
std::printf("ICC 19 - 2018\n");
break;
case GLM_COMPILER_INTEL21:
std::printf("ICC 21 - 2021\n");
break;
default:
std::printf("Intel compiler version not detected\n");
Expand Down

0 comments on commit f573d23

Please sign in to comment.