GRINS-0.8.0
grins_version.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 
26 #include "grins/grins_version.h"
27 
28 namespace GRINS
29 {
30 
32  {
33  std::cout << "--------------------------------------------------------" << std::endl;
34  std::cout << "GRINS Package: Version = " << GRINS_LIB_VERSION;
35  std::cout << " (" << get_grins_version() << ")" << std::endl << std::endl;
36 
37  std::cout << GRINS_LIB_RELEASE << std::endl << std::endl;
38 
39  std::cout << "Build Date = " << GRINS_BUILD_DATE << std::endl;
40  std::cout << "Build Host = " << GRINS_BUILD_HOST << std::endl;
41  std::cout << "Build User = " << GRINS_BUILD_USER << std::endl;
42  std::cout << "Build Arch = " << GRINS_BUILD_ARCH << std::endl;
43  std::cout << "Build Rev = " << GRINS_BUILD_VERSION << std::endl << std::endl;
44 
45  std::cout << "C++ Config = " << GRINS_CXX << " " << GRINS_CXXFLAGS << std::endl;
46  std::cout << "--------------------------------------------------------" << std::endl;
47 
48  return;
49  }
50 
52  {
53  /* Note: return format follows the versioning convention xx.yy.zz where
54 
55  xx = major version number
56  yy = minor version number
57  zz = micro version number
58 
59  For example:
60  v. 0.23 -> 002300 = 2300
61  v 0.23.1 -> 002301 = 2301
62  v. 10.23.2 -> 102302 */
63 
64  int major_version = 0;
65  int minor_version = 0;
66  int micro_version = 0;
67 
68 #ifdef GRINS_MAJOR_VERSION
69  major_version = GRINS_MAJOR_VERSION;
70 #endif
71 
72 #ifdef GRINS_MINOR_VERSION
73  minor_version = GRINS_MINOR_VERSION;
74 #endif
75 
76 #ifdef GRINS_MICRO_VERSION
77  micro_version = GRINS_MICRO_VERSION;
78 #endif
79 
80  return major_version*10000 + minor_version*100 + micro_version;
81  }
82 
83 } // namespace GRINS
int get_grins_version()
Definition: grins_version.C:51
GRINS namespace.
void grins_version_stdout()
Definition: grins_version.C:31

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1