add warning banner to the LAMMPS output and refer to the C++11 issue on github

This commit is contained in:
Axel Kohlmeyer
2019-09-18 16:49:48 -04:00
parent 2ea11b3195
commit 5dba4b66c8
2 changed files with 14 additions and 1 deletions

View File

@ -24,7 +24,7 @@ explain how to do this for building both with CMake and make.
:line :line
C++11 standard compliance test :h4(cxx11) C++11 standard compliance test :h4,link(cxx11)
The LAMMPS developers plan to transition to make the C++11 standard the The LAMMPS developers plan to transition to make the C++11 standard the
minimum requirement for compiling LAMMPS. Currently this only applies to minimum requirement for compiling LAMMPS. Currently this only applies to

View File

@ -444,6 +444,19 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
if ((universe->me == 0) && !helpflag) { if ((universe->me == 0) && !helpflag) {
if (screen) fprintf(screen,"LAMMPS (%s)\n",universe->version); if (screen) fprintf(screen,"LAMMPS (%s)\n",universe->version);
if (logfile) fprintf(logfile,"LAMMPS (%s)\n",universe->version); if (logfile) fprintf(logfile,"LAMMPS (%s)\n",universe->version);
#if defined(LAMMPS_CXX98)
const char warning[] = "\nWARNING-WARNING-WARNING-WARNING-WARNING\n"
"This LAMMPS executable was compiled using C++98 compatibility.\n"
"Please report the compiler info below at https://github.com/lammps/lammps/issues/1659\n";
const char *infobuf = Info::get_compiler_info();
if (screen)
fprintf(screen,"%s%s\nWARNING-WARNING-WARNING-WARNING-WARNING\n\n",
warning,infobuf);
if (logfile)
fprintf(logfile,"%s%s\nWARNING-WARNING-WARNING-WARNING-WARNING\n\n",
warning,infobuf);
delete[] infobuf;
#endif
} }
// universe is one or more worlds, as setup by partition switch // universe is one or more worlds, as setup by partition switch