Elements 6.3.1
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Project.tpp
Go to the documentation of this file.
1
21// IWYU pragma: private, include "ElementsKernel/Project.h"
22
23#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_PROJECT_IMPL_
24#error "This file should not be included directly! Use ElementsKernel/Project.h instead"
25#else
26
27#include <cstdint> // for uint_least64_t
28#include <ostream> // for operator<<, basic_ostream, endl, ostream
29#include <string> // for char_traits, operator<<, basic_string, string
30#include <vector> // for vector
31
32#include "ThisProject.h" // for CMAKE_INSTALL_PREFIX_STRING, ...
33
34namespace Elements {
35struct Project;
36}
37
38namespace Elements {
39
41 return THIS_PROJECT_NAME_STRING;
42}
43
45 return THIS_PROJECT_VERSION_STRING;
46}
47
49 return THIS_PROJECT_VERSION;
50}
51
53 return THIS_PROJECT_MAJOR_VERSION;
54}
55
57 return THIS_PROJECT_MINOR_VERSION;
58}
59
61 return THIS_PROJECT_PATCH_VERSION;
62}
63
65 return THIS_PROJECT_ORIGINAL_VERSION;
66}
67
69 return THIS_PROJECT_VCS_VERSION;
70}
71
73 return THIS_PROJECT_INSTALL_LOCATION_STRING;
74}
75
76inline bool Project::useSoVersion() {
77 return THIS_PROJECT_USE_SOVERSION;
78}
79
81 return CMAKE_INSTALL_PREFIX_STRING;
82}
83
85 return THIS_PROJECT_SEARCH_DIRS;
86}
87
88inline std::ostream& operator<<(std::ostream& stream, const Project& /* p */) {
89 stream << "Name: " << Elements::Project::name() << std::endl;
90 stream << "Version String: " << Elements::Project::versionString() << std::endl;
91 stream << "Version: " << Elements::Project::version() << std::endl;
92 stream << "Major Version: " << Elements::Project::majorVersion() << std::endl;
93 stream << "Minor Version: " << Elements::Project::minorVersion() << std::endl;
94 stream << "Patch Version: " << Elements::Project::patchVersion() << std::endl;
95 stream << "Original Version: " << Elements::Project::originalVersion() << std::endl;
96 stream << "VCS Version: " << Elements::Project::vcsVersion() << std::endl;
97 stream << "Install Location: " << Elements::Project::installLocation() << std::endl;
98 stream << "Use So Version: " << Elements::Project::useSoVersion() << std::endl;
99 stream << "Install Prefix: " << Elements::Project::installPrefix() << std::endl;
100 stream << "Search Directories: ";
101
102 for (const auto& d : Project::searchDirectories()) {
103 stream << d << " ";
104 }
105
106 return stream;
107}
108
109} // namespace Elements
110
111#endif // ELEMENTSKERNEL_ELEMENTSKERNEL_PROJECT_IMPL_
T endl(T... args)
ELEMENTS_API std::ostream & operator<<(std::ostream &, const Environment::Variable &)
static std::uint_least64_t minorVersion()
static bool useSoVersion()
static std::uint_least64_t majorVersion()
static std::string originalVersion()
static std::string installPrefix()
static std::vector< std::string > searchDirectories()
static std::uint_least64_t patchVersion()
static std::uint_least64_t version()
static std::string vcsVersion()
static std::string versionString()
static std::string installLocation()
static std::string name()