diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-15 19:42:26 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-18 10:00:21 -0400 |
commit | 7235334a2f1b9a627cc1cdbc701ae0768b6e32c3 (patch) | |
tree | 36675c9df0477e6ecdb027979cfce0dbbdab2d15 /Modules/CMakeCCompilerId.c.in | |
parent | cda189356e7e0a897377c3d7ed02ea3a3ad1de5a (diff) | |
download | cmake-7235334a2f1b9a627cc1cdbc701ae0768b6e32c3.tar.gz |
Project: Determine default language dialect for the compiler.
Use the __cplusplus and __STDC_VERSION__ macros to automatically
determine the default dialect for the compiler while determining its
id and version.
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 09ae50936d..b224007807 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -24,6 +24,17 @@ char const* qnxnto = "INFO" ":" "qnxnto[]"; @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@ +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if !defined(__STDC_VERSION__) + "90" +#elif __STDC_VERSION__ >= 201000L + "11" +#elif __STDC_VERSION__ >= 199901L + "99" +#else +#endif +"]"; + /*--------------------------------------------------------------------------*/ #ifdef ID_VOID_MAIN |