foamVersion.H File Reference
Include dependency graph for foamVersion.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Foam::foamVersion
 Namespace for OpenFOAM version information.
 
 Foam
 Namespace for OpenFOAM.
 

Macros

#define FOAM_RESOURCE_USER_CONFIG_DIRNAME   ".OpenFOAM"
 The directory name for user-resources within the HOME directory. More...
 
#define FOAM_RESOURCE_SITE_ENVNAME   "WM_PROJECT_SITE"
 The env name for site-resources to obtain a site-resources directory. More...
 
#define FOAM_RESOURCE_SITE_FALLBACK_ENVNAME   "WM_PROJECT_DIR"
 The env name for determining a fallback directory name for site-resources when the directory corresponding to FOAM_RESOURCE_SITE_ENVNAME is empty. More...
 
#define FOAMversion   foamVersion::version.c_str()
 
#define FOAMbuild   foamVersion::build.c_str()
 
#define FOAMbuildArch   foamVersion::buildArch
 

Functions

bool patched ()
 Test if the patch string appears to be in use, which is when it is defined (non-zero). More...
 
unsigned labelByteSize (const std::string &str)
 Extract label size (in bytes) from "label=" tag in string. More...
 
unsigned scalarByteSize (const std::string &str)
 Extract scalar size (in bytes) from "scalar=" tag in string. More...
 
void printBuildInfo (std::ostream &os, const bool full=true)
 Print information about version, build, arch to output stream. More...
 
std::string configuredProjectDir ()
 Compile-time definition of the OpenFOAM project directory or empty if not defined. More...
 
std::string configuredEtcDir ()
 Compile-time definition of the OpenFOAM etc/ directory or empty if not defined. More...
 

Variables

const int api
 OpenFOAM api number (integer) corresponding to the value of OPENFOAM at the time of compilation. More...
 
const std::string patch
 OpenFOAM patch number as a std::string. More...
 
const std::string build
 OpenFOAM build information as a std::string. More...
 
const std::string buildArch
 OpenFOAM build architecture information (machine endian, label/scalar sizes) as a std::string. More...
 
const std::string version
 OpenFOAM version (name or stringified number) as a std::string. More...
 

Detailed Description

Original source file foamVersion.H

Definition in file foamVersion.H.

Macro Definition Documentation

◆ FOAM_RESOURCE_USER_CONFIG_DIRNAME

#define FOAM_RESOURCE_USER_CONFIG_DIRNAME   ".OpenFOAM"

The directory name for user-resources within the HOME directory.

Default: ".OpenFOAM" Used by foamEtcFiles(), stringOps::expand(), Foam::JobInfo

Definition at line 64 of file foamVersion.H.

◆ FOAM_RESOURCE_SITE_ENVNAME

#define FOAM_RESOURCE_SITE_ENVNAME   "WM_PROJECT_SITE"

The env name for site-resources to obtain a site-resources directory.

Default: "WM_PROJECT_SITE" Used by foamEtcFiles() and stringOps::expand()

Definition at line 73 of file foamVersion.H.

◆ FOAM_RESOURCE_SITE_FALLBACK_ENVNAME

#define FOAM_RESOURCE_SITE_FALLBACK_ENVNAME   "WM_PROJECT_DIR"

The env name for determining a fallback directory name for site-resources when the directory corresponding to FOAM_RESOURCE_SITE_ENVNAME is empty.

The fallback search appends "/site" to the directory.

Default: "WM_PROJECT_DIR" Used by foamEtcFiles() and stringOps::expand()

Definition at line 84 of file foamVersion.H.

◆ FOAMversion

#define FOAMversion   foamVersion::version.c_str()

Definition at line 198 of file foamVersion.H.

◆ FOAMbuild

#define FOAMbuild   foamVersion::build.c_str()

Definition at line 199 of file foamVersion.H.

◆ FOAMbuildArch

#define FOAMbuildArch   foamVersion::buildArch

Definition at line 200 of file foamVersion.H.