SpECTRE Documentation Coverage Report
Current view: top level - Informer - InfoFromBuild.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 100.0 % 10 10
Test Date: 2026-10-22 17:29:42
Legend: Lines:     hit not hit

            Line data    Source code
       1            1 : // Distributed under the MIT License.
       2              : // See LICENSE.txt for details.
       3              : 
       4              : /// \file
       5              : /// Declares function info_from_build.
       6              : 
       7              : #pragma once
       8              : 
       9              : #include <string>
      10              : 
      11              : /*!
      12              :  * \ingroup LoggingGroup
      13              :  * \brief Information about the version, date, host, git commit, and link time
      14              :  *
      15              :  * The information returned by this function is invaluable for identifying
      16              :  * the version of the code used in a simulation, as well as which host, the
      17              :  * date the code was compiled, and the time of linkage.
      18              :  */
      19            1 : std::string info_from_build();
      20              : 
      21              : /*!
      22              :  * \ingroup LoggingGroup
      23              :  * \brief Returns a string containing the copyright and license info for
      24              :  * SpECTRE and its dependencies.
      25              :  */
      26            1 : std::string copyright_and_license_info();
      27              : 
      28              : // We declare these functions `extern "C"` so their symbols are not mangled and
      29              : // we can ignore that they are undefined until link time (see `CMakeLists.txt`).
      30              : // Note that the `std::string` return type is not compatible with C, but that's
      31              : // OK as long as we're not calling or defining the functions in C. See
      32              : // Microsoft's C4190:
      33              : // https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4190
      34              : #if defined(__clang__)
      35              : #pragma GCC diagnostic push
      36              : #pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
      37              : #endif  // defined(__clang__)
      38              : /*!
      39              :  * \ingroup LoggingGroup
      40              :  * \brief The time and date the executable was linked
      41              :  */
      42            1 : extern "C" std::string link_date();
      43              : /*!
      44              :  * \ingroup LoggingGroup
      45              :  * \brief Name of the linked executable
      46              :  */
      47            1 : extern "C" std::string executable_name();
      48              : /*!
      49              :  * \ingroup LoggingGroup
      50              :  * \brief The git description at the time the executable was linked
      51              :  */
      52            1 : extern "C" std::string git_description();
      53              : /*!
      54              :  * \ingroup LoggingGroup
      55              :  * \brief The git branch at the time the executable was linked
      56              :  */
      57            1 : extern "C" std::string git_branch();
      58              : #if defined(__clang__)
      59              : #pragma GCC diagnostic pop
      60              : #endif  // defined(__clang__)
      61              : 
      62              : /*!
      63              :  * \ingroup LoggingGroup
      64              :  * \brief Retrieve a string containing the current version of SpECTRE
      65              :  */
      66            1 : std::string spectre_version();
      67              : 
      68              : /*!
      69              :  * \ingroup LoggingGroup
      70              :  * \brief Returns the path to the Unit test directory.
      71              :  */
      72            1 : std::string unit_test_src_path();
      73              : 
      74              : /*!
      75              :  * \ingroup LoggingGroup
      76              :  * \brief Returns the path to the Unit test directory in the build directory.
      77              :  */
      78            1 : std::string unit_test_build_path();
        

Generated by: LCOV version 2.0-1