Add build time to flow startup banner

This commit is contained in:
Joakim Hove
2020-03-31 08:42:24 +02:00
parent 4a6814d6bc
commit c8524a139e
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 << ", Memory size: " << std::fixed << std::setprecision (2) << mem_size << " MB) \n";
ss << "Operating system = " << arch.sysname << " " << arch.machine << " (Kernel: " << arch.release; ss << "Operating system = " << arch.sysname << " " << arch.machine << " (Kernel: " << arch.release;
ss << ", " << arch.version << " )\n"; ss << ", " << arch.version << " )\n";
ss << "Build time = " << compileTimestamp() << "\n";
} }
if (user) { if (user) {
ss << "User = " << user << std::endl; ss << "User = " << user << std::endl;

View File

@@ -46,4 +46,11 @@ namespace Opm
return PROJECT_VERSION; 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 } // namespace Opm

View File

@@ -39,6 +39,10 @@ namespace Opm
/// "2016.04-pre (f15be17)" or "2016.04-pre (debug)". /// "2016.04-pre (f15be17)" or "2016.04-pre (debug)".
std::string moduleVersion(); 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 } // namespace Opm
#endif // OPM_MODULEVERSION_HEADER_INCLUDED #endif // OPM_MODULEVERSION_HEADER_INCLUDED