summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-22 11:08:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-22 11:08:58 (GMT)
commitca3e83250f43285fa3c9a0f5e062a3fd94a097e0 (patch)
tree8a226aa6cd42cab4944c4c0861e1b6b0419cfd83 /Modules/Compiler
parentb3802804f1a7fa5c994fdefe34f2e94138759d8d (diff)
parent3958ed878f2365fd1af004341d45dac7f4e94afb (diff)
downloadCMake-ca3e83250f43285fa3c9a0f5e062a3fd94a097e0.zip
CMake-ca3e83250f43285fa3c9a0f5e062a3fd94a097e0.tar.gz
CMake-ca3e83250f43285fa3c9a0f5e062a3fd94a097e0.tar.bz2
Merge topic 'lcc-policy'
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6643
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/LCC-C-DetermineCompiler.cmake8
-rw-r--r--Modules/Compiler/LCC-CXX-DetermineCompiler.cmake8
2 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Compiler/LCC-C-DetermineCompiler.cmake b/Modules/Compiler/LCC-C-DetermineCompiler.cmake
index 6c7a08f..2ce92fe 100644
--- a/Modules/Compiler/LCC-C-DetermineCompiler.cmake
+++ b/Modules/Compiler/LCC-C-DetermineCompiler.cmake
@@ -8,4 +8,12 @@ set(_compiler_id_version_compute "
# endif
# if defined(__LCC_MINOR__)
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__LCC_MINOR__)
+# endif
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define @PREFIX@SIMULATE_ID \"GNU\"
+# define @PREFIX@SIMULATE_VERSION_MAJOR @MACRO_DEC@(__GNUC__)
+# define @PREFIX@SIMULATE_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__)
+# if defined(__GNUC_PATCHLEVEL__)
+# define @PREFIX@SIMULATE_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__)
+# endif
# endif")
diff --git a/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake b/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake
index 6c7a08f..2ce92fe 100644
--- a/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake
+++ b/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake
@@ -8,4 +8,12 @@ set(_compiler_id_version_compute "
# endif
# if defined(__LCC_MINOR__)
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__LCC_MINOR__)
+# endif
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define @PREFIX@SIMULATE_ID \"GNU\"
+# define @PREFIX@SIMULATE_VERSION_MAJOR @MACRO_DEC@(__GNUC__)
+# define @PREFIX@SIMULATE_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__)
+# if defined(__GNUC_PATCHLEVEL__)
+# define @PREFIX@SIMULATE_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__)
+# endif
# endif")