summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePlatformId.h.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-29 20:35:15 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-29 20:35:15 (GMT)
commitdbc79bd8c8d5b9ef078401064db9bb0554affbcf (patch)
treee5768d3694b94ab7752c2229683133cb57c7d79c /Modules/CMakePlatformId.h.in
parent63d21c1f8efeb2f2337221119c479d75bbb0b7c0 (diff)
downloadCMake-dbc79bd8c8d5b9ef078401064db9bb0554affbcf.zip
CMake-dbc79bd8c8d5b9ef078401064db9bb0554affbcf.tar.gz
CMake-dbc79bd8c8d5b9ef078401064db9bb0554affbcf.tar.bz2
Fix constness in compiler id detection
Since commit 70c2dc8a (Make compiler id detection more robust, 2008-03-10) we store compiler identification strings in test binaries using the form char* info = "info"; Use the const-correct char const* info = "info"; form instead. This allows the C++ compiler identification to work with "-Werror -Wall" or equivalent flags if the compiler would warn about const-to-non-const conversion.
Diffstat (limited to 'Modules/CMakePlatformId.h.in')
-rw-r--r--Modules/CMakePlatformId.h.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index e20348a..718e289 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -109,6 +109,6 @@
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 "]";
-char* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";