diff --git a/src/config/Config.h b/src/config/Config.h index 1f2b94f4b017299e0d877fd1efced590c5638ccb..414d3f96f14deebfccd3aaf38aab71e5652ad08a 100644 --- a/src/config/Config.h +++ b/src/config/Config.h @@ -85,6 +85,14 @@ std::string getVersionLong(); /// E.g. "c5badb091cd30" std::string getVersionGit(); +/// Return the day PLUMED was compiled. +/// E.g. "Apr 16 2018" +std::string getCompilationDate(); + +/// Return the time at which PLUMED was compiled. +/// E.g. "13:27:58" +std::string getCompilationTime(); + bool hasMatheval(); bool hasDlopen(); diff --git a/src/config/Config.inc.in b/src/config/Config.inc.in index 6ffce32155c2a9f1d8a9851ae7095d8a2ee22d6b..aceda6358bca751af34ca4f0b90ebfa557786967 100644 --- a/src/config/Config.inc.in +++ b/src/config/Config.inc.in @@ -167,6 +167,15 @@ bool hasXdrfile() { #endif } +std::string getCompilationDate() { + return __DATE__; +} + +std::string getCompilationTime() { + return __TIME__; +} + + } } diff --git a/src/core/PlumedMain.cpp b/src/core/PlumedMain.cpp index 44c22f6c8a39d494cda3a0d6ecb67c5cec9eb23e..ee7740b29d93bced5a9dce11fdd652f6ceda16af 100644 --- a/src/core/PlumedMain.cpp +++ b/src/core/PlumedMain.cpp @@ -485,7 +485,8 @@ void PlumedMain::init() { atoms.init(); if(!log.isOpen()) log.link(stdout); log<<"PLUMED is starting\n"; - log<<"Version: "<<config::getVersionLong()<<" (git: "<<config::getVersionGit()<<") compiled on " __DATE__ " at " __TIME__ "\n"; + log<<"Version: "<<config::getVersionLong()<<" (git: "<<config::getVersionGit()<<") " + <<"compiled on " <<config::getCompilationDate() << " at " << config::getCompilationTime() << "\n"; log<<"Please cite this paper when using PLUMED "; log<<cite("Tribello, Bonomi, Branduardi, Camilloni, and Bussi, Comput. Phys. Commun. 185, 604 (2014)"); log<<"\n";