summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-15 17:42:26 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-18 14:00:21 (GMT)
commit7235334a2f1b9a627cc1cdbc701ae0768b6e32c3 (patch)
tree36675c9df0477e6ecdb027979cfce0dbbdab2d15 /Modules/CMakeCXXCompilerId.cpp.in
parentcda189356e7e0a897377c3d7ed02ea3a3ad1de5a (diff)
downloadCMake-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.in10
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[])