1 // Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3 // 4 // SPDX-License-Identifier: BSD-2-Clause 5 // 6 // This file is part of CEED: http://github.com/ceed 7 8 #include <ceed-impl.h> 9 10 const char *CeedGitVersion = CEED_GIT_VERSION; 11 const char *CeedBuildConfiguration = CEED_BUILD_CONFIGURATION; 12 13 /// @addtogroup CeedUser 14 /// @{ 15 16 /** 17 @brief Get output of `git describe --dirty` from build time 18 19 While @ref CeedGetVersion() uniqely identifies the source code for release 20 builds, it does not identify builds from other commits. 21 22 @param[out] git_version A static string containing the Git commit description. 23 24 If `git describe --always --dirty` fails, the string `"unknown"` will be provided. 25 This could occur if Git is not installed or if libCEED is not being built from a repository, for example.` 26 27 @return An error code: 0 - success, otherwise - failure 28 29 @ref Developer 30 31 @sa CeedGetVersion() CeedGetBuildConfiguration() 32 */ 33 int CeedGetGitVersion(const char **git_version) { 34 *git_version = CeedGitVersion; 35 return CEED_ERROR_SUCCESS; 36 } 37 38 /** 39 @brief Get build variables as a multi-line string 40 41 Each line of the string has the format `VARNAME = value`. 42 43 @param[out] build_config A static string containing build variables 44 45 @return An error code: 0 - success, otherwise - failure 46 47 @ref Developer 48 49 @sa CeedGetVersion() CeedGetGitVersion() 50 */ 51 int CeedGetBuildConfiguration(const char **build_config) { 52 *build_config = CeedBuildConfiguration; 53 return CEED_ERROR_SUCCESS; 54 } 55 56 /// @} 57