diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-15 17:42:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-18 14:00:21 (GMT) |
commit | 7235334a2f1b9a627cc1cdbc701ae0768b6e32c3 (patch) | |
tree | 36675c9df0477e6ecdb027979cfce0dbbdab2d15 /Modules/CMakeCXXCompilerId.cpp.in | |
parent | cda189356e7e0a897377c3d7ed02ea3a3ad1de5a (diff) | |
download | CMake-7235334a2f1b9a627cc1cdbc701ae0768b6e32c3.zip CMake-7235334a2f1b9a627cc1cdbc701ae0768b6e32c3.tar.gz CMake-7235334a2f1b9a627cc1cdbc701ae0768b6e32c3.tar.bz2 |
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/CMakeCXXCompilerId.cpp.in')
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index cc3ab49..d467507 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -23,6 +23,16 @@ char const* qnxnto = "INFO" ":" "qnxnto[]"; @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@ +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if __cplusplus >= 201402L + "14" +#elif __cplusplus >= 201103L + "11" +#else + "98" +#endif +"]"; + /*--------------------------------------------------------------------------*/ int main(int argc, char* argv[]) |