From 08fd5da6a79f01539cd88bef116ee1729b3785fc Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Wed, 23 Mar 2022 22:46:40 +0100 Subject: [PATCH] Use empty string for buildtime if BUILD_TIMESTAMP is not set. In combination with the relevant changes in opm-common this prevent flow in binary Linux packages from having a timestamp in the executable that changes with every rebuild. With the changes in opm-common one can now set the variable OPM_BINARY_PACKAGE_VERSION to a meaningful version string (Debian 11.2: 2021.10-4). If that is done and flow is built from tarballs it will now not have a time stamp and print the package version to the PRT file. E.g. Flow Version = 2021.10 (Debian 11.2: 2021.10-1) --- opm/simulators/utils/moduleVersion.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opm/simulators/utils/moduleVersion.cpp b/opm/simulators/utils/moduleVersion.cpp index 4bbf22c3a..b6420f802 100644 --- a/opm/simulators/utils/moduleVersion.cpp +++ b/opm/simulators/utils/moduleVersion.cpp @@ -51,7 +51,11 @@ namespace Opm /// the binary was compiled. std::string compileTimestamp() { +#ifdef BUILD_TIMESTAMP return BUILD_TIMESTAMP; +#else + return ""; +#endif } } // namespace Opm