CYCLUS
version.cc
Go to the documentation of this file.
1 #include <sstream>
2 #include <cstring>
3 
4 #include "platform.h"
5 #include "version.h"
6 
7 #if CYCLUS_HAS_COIN
8 #include "CbcConfig.h"
9 #include "ClpConfig.h"
10 // required for coin-cbc v < 2.5
11 #ifndef CBC_VERSION
12 #define CBC_VERSION CBCVERSION
13 #endif
14 #else
15 #define CBC_VERSION "-1"
16 #define CLP_VERSION "-1"
17 #endif
18 
19 #include "boost/version.hpp"
20 #include "hdf5.h"
21 #include "libxml/xmlversion.h"
22 #include "libxml++config.h"
23 #include "sqlite3.h"
24 
25 
26 #define INNER(x) #x
27 #define SVER(x,y,z) INNER(x.y.z)
28 
29 namespace cyclus {
30 namespace version {
31 
32 static char h5version[15];
33 
34 const char* describe() {
35  return "1.5.5";
36 }
37 
38 const char* core() {
40 }
41 
42 const char* boost() {
43  return BOOST_LIB_VERSION;
44 }
45 
46 const char* sqlite3() {
47  return SQLITE_VERSION;
48 }
49 
50 const char* hdf5() {
51  if (std::string("") == h5version) {
52  std::stringstream ss;
53  ss << H5_VERS_MAJOR << ".";
54  ss << H5_VERS_MINOR << ".";
55  ss << H5_VERS_RELEASE << "-";
56  ss << H5_VERS_SUBRELEASE;
57  memset(h5version, 0, 15);
58  memcpy(h5version, ss.str().c_str(), ss.str().size());
59  }
60  return h5version;
61 }
62 
63 const char* xml2() {
64  return LIBXML_DOTTED_VERSION;
65 }
66 
67 const char* xmlpp() {
68  #ifdef LIBXMLXX_MAJOR_VERSION
69  return SVER(LIBXMLXX_MAJOR_VERSION, LIBXMLXX_MINOR_VERSION, \
70  LIBXMLXX_MICRO_VERSION);
71  #else
72  return "<2.37";
73  #endif
74 }
75 
76 const char* coincbc() {
77  return CBC_VERSION;
78 }
79 
80 const char* coinclp() {
81  return CLP_VERSION;
82 }
83 
84 } // namespace version
85 } // namespace cyclus
const char * xmlpp()
Definition: version.cc:67
const char * xml2()
Definition: version.cc:63
#define CYCLUS_VERSION_MAJOR
Definition: version.h:4
def memcpy(dest, src, size)
const char * describe()
Definition: version.cc:34
#define SVER(x, y, z)
Definition: version.cc:27
#define CBC_VERSION
Definition: version.cc:12
def memset(dest, src, size)
#define CYCLUS_VERSION_MINOR
Definition: version.h:5
const char * core()
Definition: version.cc:38
const char * coincbc()
Definition: version.cc:76
const char * coinclp()
Definition: version.cc:80
const char * boost()
Definition: version.cc:42
static char h5version[15]
Definition: version.cc:32
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
Definition: agent.cc:14
const char * hdf5()
Definition: version.cc:50
const char * sqlite3()
Definition: version.cc:46
#define CYCLUS_VERSION_MICRO
Definition: version.h:6