GooseFEM 1.4.1.dev2+g78f16df
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 "@PROJECT_VERSION@"
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
82#if defined(GOOSEFEM_EIGEN) || defined(EIGEN_WORLD_VERSION)
83
84 ret.push_back(
85 "eigen=" + detail::unquote(std::string(QUOTE(EIGEN_WORLD_VERSION))) + "." +
86 detail::unquote(std::string(QUOTE(EIGEN_MAJOR_VERSION))) + "." +
87 detail::unquote(std::string(QUOTE(EIGEN_MINOR_VERSION)))
88 );
89
90#endif
91
92 return ret;
93}
94
95} // namespace GooseFEM
96
97#endif
Basic configuration:
Toolbox to perform finite element computations.
Definition Allocate.h:14
std::string version()
Return version string, e.g.
Definition version.h:55
auto AsTensor(const T &arg, const S &shape)
"Broadcast" a scalar stored in an array (e.g.
Definition Allocate.h:167
std::vector< std::string > version_dependencies()
Return versions of this library and of all of its dependencies.
Definition version.h:70
#define GOOSEFEM_VERSION
Current version.
Definition version.h:35