[go: up one dir, main page]

Menu

[6cc447]: / lib / lib_info.cpp  Maximize  Restore  History

Download this file

69 lines (56 with data), 1.7 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/** @file "/owl_cpp/lib/lib_info.cpp"
part of owl_cpp project.
@n Distributed under the Boost Software License, Version 1.0; see doc/license.txt.
@n Copyright Mikhail K Levin 2010
*******************************************************************************/
#include "owl_cpp/lib_info.hpp"
#include "boost/preprocessor/stringize.hpp"
#include "owl_cpp/version.hpp"
#ifndef OWLCPP_VERSION_1
#error define OWLCPP_VERSION_1
#endif
#ifndef OWLCPP_VERSION_2
#error define OWLCPP_VERSION_2
#endif
#ifndef OWLCPP_VERSION_3
#error define OWLCPP_VERSION_3
#endif
#ifndef OWLCPP_VERSION_EXTRA
#error define OWLCPP_VERSION_EXTRA
#endif
#ifndef OWLCPP_BUILD
#error define OWLCPP_BUILD
#endif
namespace owl_cpp {
/*
*******************************************************************************/
const std::string& lib_name() {
static const std::string name("owl_cpp");
return name;
}
/*
*******************************************************************************/
const std::string& version_str() {
static const std::string v(
BOOST_PP_STRINGIZE(OWLCPP_VERSION_1) "."
BOOST_PP_STRINGIZE(OWLCPP_VERSION_2) "."
BOOST_PP_STRINGIZE(OWLCPP_VERSION_3) "-"
BOOST_PP_STRINGIZE(OWLCPP_VERSION_EXTRA)
);
return v;
}
/*
*******************************************************************************/
const std::string& build_str() {
static const std::string str(BOOST_PP_STRINGIZE(OWLCPP_BUILD));
return str;
}
/*
*******************************************************************************/
const std::string& lib_info_str() {
static const std::string str(
lib_name() + " v" + version_str() + " build:" + build_str()
);
return str;
}
}//namespace owl_cpp