include date when LAMMPS was compiled

This commit is contained in:
Axel Kohlmeyer
2018-05-09 13:28:40 -04:00
parent e3a528a493
commit c371ce1005
3 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# Make.sh = update Makefile.lib, Makefile.shlib, Makefile.list
# or style_*.h files
# Syntax: sh Make.sh style
# sh Make.sh date
# sh Make.sh Makefile.lib
# sh Make.sh Makefile.shlib
# sh Make.sh Makefile.list
@ -55,6 +56,10 @@ style () {
fi
}
if (test $1 = "date") then
echo "static const char lammps_compile_date[] = \"`date`\";" > lmpcompiledate.h
fi
# create individual style files
# called by "make machine"
# col 1 = string to search for

View File

@ -163,6 +163,7 @@ help:
-f MAKE/MACHINES/Makefile.$@ -o -f MAKE/MINE/Makefile.$@
@if [ ! -d $(objdir) ]; then mkdir $(objdir); fi
@$(SHELL) Make.sh style
@$(SHELL) Make.sh date
@if [ -f MAKE/MACHINES/Makefile.$@ ]; \
then cp MAKE/MACHINES/Makefile.$@ $(objdir)/Makefile; fi
@if [ -f MAKE/OPTIONS/Makefile.$@ ]; \

View File

@ -978,8 +978,10 @@ void print_style(FILE *fp, const char *str, int &pos)
}
}
#include "lmpcompiledate.h"
static const char lammps_config_options[]
= "LAMMPS compile time settings:\n"
= "LAMMPS compile time settings:\n\n"
"Integer sizes setting: "
#if defined(LAMMPS_SMALLSMALL)
" -DLAMMPS_SMALLSMALL"
@ -1037,4 +1039,5 @@ static const char lammps_config_options[]
void LAMMPS::print_config(FILE *fp)
{
fputs(lammps_config_options,fp);
fprintf(fp,"LAMMPS compiled on: %s\n",lammps_compile_date);
}