summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/GNU-DetermineCompiler.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler/GNU-DetermineCompiler.cmake')
-rw-r--r--Modules/Compiler/GNU-DetermineCompiler.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-DetermineCompiler.cmake b/Modules/Compiler/GNU-DetermineCompiler.cmake
new file mode 100644
index 0000000..abb19e7
--- /dev/null
+++ b/Modules/Compiler/GNU-DetermineCompiler.cmake
@@ -0,0 +1,9 @@
+
+set(_compiler_id_pp_test "defined(__GNUC__)")
+
+set(_compiler_id_version_compute "
+# 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")