diff options
author | Brad King <brad.king@kitware.com> | 2010-12-29 20:35:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-29 20:35:15 (GMT) |
commit | dbc79bd8c8d5b9ef078401064db9bb0554affbcf (patch) | |
tree | e5768d3694b94ab7752c2229683133cb57c7d79c /Modules/CMakePlatformId.h.in | |
parent | 63d21c1f8efeb2f2337221119c479d75bbb0b7c0 (diff) | |
download | CMake-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.in | 4 |
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 "]"; |