LCOV - code coverage report
Current view: top level - src/base - libmesh_version.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 3 23 13.0 %
Date: 2025-08-19 19:27:09 Functions: 1 3 33.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // The libMesh Finite Element Library.
       2             : // Copyright (C) 2002-2025 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             : 
      18             : #include "libmesh/libmesh_version.h"
      19             : 
      20             : #include <iostream>
      21             : #include <iomanip>
      22             : 
      23           0 : void libMesh::libmesh_version_stdout()
      24             : {
      25           0 :   std::cout << "--------------------------------------------------------" << std::endl;
      26           0 :   std::cout << "libMesh Library: Version = " << LIBMESH_LIB_VERSION;
      27           0 :   std::cout << " (" << get_libmesh_version() << ")" << std::endl << std::endl;
      28             : 
      29           0 :   std::cout << LIBMESH_LIB_RELEASE << std::endl << std::endl;
      30             : 
      31           0 :   std::cout << "Build Date   = " << LIBMESH_BUILD_DATE     << std::endl;
      32           0 :   std::cout << "Build Host   = " << LIBMESH_BUILD_HOST     << std::endl;
      33           0 :   std::cout << "Build User   = " << LIBMESH_BUILD_USER     << std::endl;
      34           0 :   std::cout << "Build Arch   = " << LIBMESH_BUILD_ARCH     << std::endl;
      35           0 :   std::cout << "Build Rev    = " << LIBMESH_BUILD_VERSION  << std::endl << std::endl;
      36             : 
      37             :   // CXXFLAGS is ambiguous wth multiple methods - could add all three but why not libmesh-config?
      38             :   //std::cout << "C++ Config   = " << LIBMESH_CXX << " " << LIBMESH_CXXFLAGS << std::endl;
      39           0 :   std::cout << "--------------------------------------------------------" << std::endl;
      40             : 
      41           0 :   return;
      42             : }
      43             : 
      44             : 
      45             : 
      46           0 : int libMesh::get_libmesh_version()
      47             : {
      48             :   /* Note: return format follows the versioning convention xx.yy.zz where
      49             : 
      50             :      xx = major version number
      51             :      yy = minor version number
      52             :      zz = micro version number
      53             : 
      54             :      For example:
      55             :      v.   0.23  -> 002300 = 2300
      56             :      v   0.23.1 -> 002301 = 2301
      57             :      v. 10.23.2 -> 102302         */
      58             : 
      59           0 :   int major_version = 0;
      60           0 :   int minor_version = 0;
      61           0 :   int micro_version = 0;
      62             : 
      63             : #ifdef LIBMESH_MAJOR_VERSION
      64           0 :   major_version = LIBMESH_MAJOR_VERSION;
      65             : #endif
      66             : 
      67             : #ifdef LIBMESH_MINOR_VERSION
      68           0 :   minor_version = LIBMESH_MINOR_VERSION;
      69             : #endif
      70             : 
      71             : #ifdef LIBMESH_MICRO_VERSION
      72           0 :   micro_version = LIBMESH_MICRO_VERSION;
      73             : #endif
      74             : 
      75           0 :   return major_version*10000 + minor_version*100 + micro_version;
      76             : }
      77             : 
      78             : 
      79             : 
      80        1367 : std::string libMesh::get_io_compatibility_version ()
      81             : {
      82        1367 :   std::string retval(LIBMESH_IO_COMPATIBILITY_VERSION);
      83        1367 :   return retval;
      84             : }

Generated by: LCOV version 1.14