diff options
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 5 | ||||
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index dd3d2fd..25e4947 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -53,6 +53,11 @@ #elif defined(__GNUC__) # define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif #elif defined(_MSC_VER) # define COMPILER_ID "MSVC" diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 469290e..6494c27 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -55,6 +55,11 @@ #elif defined(__GNUC__) # define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif #elif defined(_MSC_VER) # define COMPILER_ID "MSVC" |