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