summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePlatformId.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakePlatformId.h.in')
-rw-r--r--Modules/CMakePlatformId.h.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index f62eb36..1f1fca6 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -76,4 +76,8 @@
#endif
-char info_platform[] = "INFO:platform[" PLATFORM_ID "]";
+/* 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
+ array rather than assigning a pointer to a static array. */
+char* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";