place queries for OS and compiler into functions in Info and use them for both, the info command and lmp -h/-help

This commit is contained in:
Axel Kohlmeyer
2018-12-14 14:22:13 -05:00
parent ea8376b3fa
commit 94a4b59961
3 changed files with 90 additions and 38 deletions

View File

@ -1081,6 +1081,14 @@ void LAMMPS::print_config(FILE *fp)
const char *pkg;
int ncword, ncline = 0;
char *infobuf = Info::get_os_info();
fprintf(fp,"OS: %s\n\n",infobuf);
delete[] infobuf;
infobuf = Info::get_compiler_info();
fprintf(fp,"Compiler: %s\n\n",infobuf);
delete[] infobuf;
fputs("Active compile time flags:\n\n",fp);
if (Info::has_gzip_support()) fputs("-DLAMMPS_GZIP\n",fp);
if (Info::has_png_support()) fputs("-DLAMMPS_PNG\n",fp);