summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePlatformId.h.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-04 14:10:22 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-04 17:25:06 (GMT)
commit51ab85c398319c074200ca51f37baa0e4c47ed7c (patch)
treef59e349ad80203504590265084463865832a3289 /Modules/CMakePlatformId.h.in
parentbe10826bf130d7568011ec3cf97355686c298dd3 (diff)
downloadCMake-51ab85c398319c074200ca51f37baa0e4c47ed7c.zip
CMake-51ab85c398319c074200ca51f37baa0e4c47ed7c.tar.gz
CMake-51ab85c398319c074200ca51f37baa0e4c47ed7c.tar.bz2
CMakeDetermineCompilerId: Add notion of "simulated" id/version
Some compilers try to simulate other compilers as a drop-in replacement supporting all the same command-line options and predefined preprocessor macros. In such cases it will be useful to have CMake load the compiler information files for the simulated compiler instead of duplicating the information. Teach CMakeDetermineCompilerId to extract the simulated compiler id and version when the compiler id detection provides it.
Diffstat (limited to 'Modules/CMakePlatformId.h.in')
-rw-r--r--Modules/CMakePlatformId.h.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index 69171c2..1e41fec 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -151,6 +151,24 @@ char const info_version[] = {
']','\0'};
#endif
+/* Construct a string literal encoding the version number components. */
+#ifdef SIMULATE_VERSION_MAJOR
+char const info_simulate_version[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
+ SIMULATE_VERSION_MAJOR,
+# ifdef SIMULATE_VERSION_MINOR
+ '.', SIMULATE_VERSION_MINOR,
+# ifdef SIMULATE_VERSION_PATCH
+ '.', SIMULATE_VERSION_PATCH,
+# ifdef SIMULATE_VERSION_TWEAK
+ '.', SIMULATE_VERSION_TWEAK,
+# endif
+# endif
+# endif
+ ']','\0'};
+#endif
+
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the