FrictionQPotFEM 0.23.3
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1
9#ifndef GOOSEFEM_VERSION_H
10#define GOOSEFEM_VERSION_H
11
12#include "config.h"
13
34#ifndef GOOSEFEM_VERSION
35#define GOOSEFEM_VERSION "1.3.2"
36#endif
37
38namespace GooseFEM {
39
40namespace detail {
41
42inline std::string unquote(const std::string& arg)
43{
44 std::string ret = arg;
45 ret.erase(std::remove(ret.begin(), ret.end(), '\"'), ret.end());
46 return ret;
47}
48
49} // namespace detail
50
55inline std::string version()
56{
57 return detail::unquote(std::string(QUOTE(GOOSEFEM_VERSION)));
58}
59
70inline std::vector<std::string> version_dependencies()
71{
72 std::vector<std::string> ret;
73
74 ret.push_back("goosefem=" + version());
75
76 ret.push_back(
77 "xtensor=" + detail::unquote(std::string(QUOTE(XTENSOR_VERSION_MAJOR))) + "." +
78 detail::unquote(std::string(QUOTE(XTENSOR_VERSION_MINOR))) + "." +
79 detail::unquote(std::string(QUOTE(XTENSOR_VERSION_PATCH))));
80
81#if defined(GOOSEFEM_EIGEN) || defined(EIGEN_WORLD_VERSION)
82
83 ret.push_back(
84 "eigen=" + detail::unquote(std::string(QUOTE(EIGEN_WORLD_VERSION))) + "." +
85 detail::unquote(std::string(QUOTE(EIGEN_MAJOR_VERSION))) + "." +
86 detail::unquote(std::string(QUOTE(EIGEN_MINOR_VERSION))));
87
88#endif
89
90 return ret;
91}
92
93} // namespace GooseFEM
94
95#endif
#define GOOSEFEM_VERSION
Current version.
Definition: version.h:35
Toolbox to perform finite element computations.
Definition: Allocate.h:14
std::string version()
Return version string, e.g.
Definition: version.h:55
std::vector< std::string > version_dependencies()
Return versions of this library and of all of its dependencies.
Definition: version.h:70