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/CMakeCCompilerId.c.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/CMakeCCompilerId.c.in')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index accda32..27fa341 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -85,7 +85,7 @@ 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_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@ |