print C++ standard in use message with help page and "info config" command

This commit is contained in:
Axel Kohlmeyer
2019-10-03 17:21:20 +02:00
parent bb4dc59803
commit 6580700943
3 changed files with 21 additions and 1 deletions

View File

@ -281,6 +281,7 @@ void Info::command(int narg, char **arg)
infobuf = get_compiler_info();
fprintf(out,"\nCompiler: %s with %s\n",infobuf,get_openmp_info());
delete[] infobuf;
fprintf(out,"C++ standard: %s\n",get_cxx_info());
fputs("\nActive compile time flags:\n\n",out);
if (has_gzip_support()) fputs("-DLAMMPS_GZIP\n",out);
@ -1208,6 +1209,23 @@ const char *Info::get_openmp_info()
#endif
}
const char *Info::get_cxx_info()
{
#if __cplusplus > 201703L
return (const char *)"newer than C++17";
#elif __cplusplus == 201703L
return (const char *)"C++17";
#elif __cplusplus == 201402L
return (const char *)"C++14";
#elif __cplusplus == 201103L
return (const char *)"C++11";
#elif __cplusplus == 199711L
return (const char *)"C++98";
#else
return (const char *)"unknown";
#endif
}
/* ---------------------------------------------------------------------- */
char **Info::get_variable_names(int &num) {