hpp-util  4.9.0
Debugging tools for the HPP project.
version.hh
Go to the documentation of this file.
1 // Copyright (C) 2008, 2009 by Thomas Moulard, CNRS.
2 //
3 // This file is part of the hpp-util.
4 //
5 // This software is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the
7 // implied warranties of fitness for a particular purpose.
8 //
9 // See the COPYING file for more information.
10 
11 #ifndef HPP_UTIL_VERSION_HH
12 # define HPP_UTIL_VERSION_HH
13 # include <hpp/util/config.hh>
14 
15 // Compare header version to library version.
16 # define HPP_UTIL_CHECK() \
17  ::hpp::util::checkVersion (HPP_UTIL_VERSION)
18 
19 namespace hpp
20 {
21  namespace util
22  {
23  // Package version (compiled).
24  HPP_UTIL_DLLAPI extern const char* version;
25 
26  // Check that header and library version are compatible.
27  //
28  // Return 0 if equal, 1 if library is newer and -1 if library is
29  // older. The last possibility is an error and program should be
30  // terminated in this case.
31  HPP_UTIL_DLLAPI int checkVersion (const char* header_version);
32  } // end of namespace util.
33 } // end of namespace hpp.
34 
35 #endif
Definition: assertion.hh:24
HPP_UTIL_DLLAPI const char * version
Definition: version.cc:31
HPP_UTIL_DLLAPI int checkVersion(const char *header_version)
Definition: version.cc:33