libmesh_version.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
19 
21 {
22  std::cout << "--------------------------------------------------------" << std::endl;
23  std::cout << "libMesh Library: Version = " << LIBMESH_LIB_VERSION;
24  std::cout << " (" << get_libmesh_version() << ")" << std::endl << std::endl;
25 
26  std::cout << LIBMESH_LIB_RELEASE << std::endl << std::endl;
27 
28  std::cout << "Build Date = " << LIBMESH_BUILD_DATE << std::endl;
29  std::cout << "Build Host = " << LIBMESH_BUILD_HOST << std::endl;
30  std::cout << "Build User = " << LIBMESH_BUILD_USER << std::endl;
31  std::cout << "Build Arch = " << LIBMESH_BUILD_ARCH << std::endl;
32  std::cout << "Build Rev = " << LIBMESH_BUILD_VERSION << std::endl << std::endl;
33 
34  // CXXFLAGS is ambiguous wth multiple methods - could add all three but why not libmesh-config?
35  //std::cout << "C++ Config = " << LIBMESH_CXX << " " << LIBMESH_CXXFLAGS << std::endl;
36  std::cout << "--------------------------------------------------------" << std::endl;
37 
38  return;
39 }
40 
41 
42 
44 {
45  /* Note: return format follows the versioning convention xx.yy.zz where
46 
47  xx = major version number
48  yy = minor version number
49  zz = micro version number
50 
51  For example:
52  v. 0.23 -> 002300 = 2300
53  v 0.23.1 -> 002301 = 2301
54  v. 10.23.2 -> 102302 */
55 
56  int major_version = 0;
57  int minor_version = 0;
58  int micro_version = 0;
59 
60 #ifdef LIBMESH_MAJOR_VERSION
61  major_version = LIBMESH_MAJOR_VERSION;
62 #endif
63 
64 #ifdef LIBMESH_MINOR_VERSION
65  minor_version = LIBMESH_MINOR_VERSION;
66 #endif
67 
68 #ifdef LIBMESH_MICRO_VERSION
69  micro_version = LIBMESH_MICRO_VERSION;
70 #endif
71 
72  return major_version*10000 + minor_version*100 + micro_version;
73 }
74 
75 
76 
78 {
79  std::string retval(LIBMESH_IO_COMPATIBILITY_VERSION);
80  return retval;
81 }

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:05 UTC

Hosted By:
SourceForge.net Logo