Merge pull request #2506 from joakim-hove/compile-time

Add build time to flow startup banner
This commit is contained in:
Atgeirr Flø Rasmussen 2020-03-31 15:04:50 +02:00 committed by GitHub
commit 1f5e032427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -315,6 +315,7 @@ namespace Opm
ss << ", Memory size: " << std::fixed << std::setprecision (2) << mem_size << " MB) \n";
ss << "Operating system = " << arch.sysname << " " << arch.machine << " (Kernel: " << arch.release;
ss << ", " << arch.version << " )\n";
ss << "Build time = " << compileTimestamp() << "\n";
}
if (user) {
ss << "User = " << user << std::endl;

View File

@ -46,4 +46,11 @@ namespace Opm
return PROJECT_VERSION;
}
/// Return a string "dd-mm-yyyy at HH::MM::SS hrs" which is the time
/// the binary was compiled.
std::string compileTimestamp()
{
return BUILD_TIMESTAMP;
}
} // namespace Opm

View File

@ -39,6 +39,10 @@ namespace Opm
/// "2016.04-pre (f15be17)" or "2016.04-pre (debug)".
std::string moduleVersion();
/// Return a string "dd-mm-yyyy at HH::MM::SS hrs" which is the time
/// the binary was compiled.
std::string compileTimestamp();
} // namespace Opm
#endif // OPM_MODULEVERSION_HEADER_INCLUDED