Commit ffca2c44 authored by Tobias Meisel's avatar Tobias Meisel Committed by Lars Bilke

[MeL/IO] Xdmf contains OGS_VERSION

parent 234055a9
......@@ -17,6 +17,7 @@ namespace GitInfoLib
namespace GitInfo
{
const std::string OGS_VERSION = "OGS_VERSION";
const std::string git_version_sha1_short("@GIT_SHA1_SHORT@");
const std::string ogs_version("@OGS_VERSION@");
}
......
......@@ -21,6 +21,7 @@ namespace GitInfoLib
namespace GitInfo
{
extern GITINFOLIB_EXPORT std::string const OGS_VERSION;
extern GITINFOLIB_EXPORT const std::string git_version_sha1_short;
extern GITINFOLIB_EXPORT const std::string ogs_version;
} // namespace
......
......@@ -26,7 +26,7 @@ ogs_add_library(MeshLib ${SOURCES})
target_link_libraries(
MeshLib
PUBLIC BaseLib GeoLib MathLib ${VTK_LIBRARIES}
PUBLIC BaseLib GeoLib GitInfoLib MathLib ${VTK_LIBRARIES}
PRIVATE spdlog::spdlog)
if(OGS_USE_MPI AND TARGET MPI::MPI_CXX)
......
......@@ -27,7 +27,7 @@
static void addOgsVersion(MeshLib::Mesh& mesh)
{
auto& ogs_version_field = *MeshLib::getOrCreateMeshProperty<char>(
mesh, "OGS_VERSION", MeshLib::MeshItemType::IntegrationPoint, 1);
mesh, GitInfoLib::GitInfo::OGS_VERSION, MeshLib::MeshItemType::IntegrationPoint, 1);
ogs_version_field.assign(GitInfoLib::GitInfo::ogs_version.begin(),
GitInfoLib::GitInfo::ogs_version.end());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment