dodo  0.0.1
A C++ library to create containerized Linux services
dodo::BuildEnv Class Reference

Build information, generated by cmake during builds from buildenv.hpp.in. More...

#include <buildenv.hpp>

Public Types

enum  cppStandard {
  stUnknown, stPreCpp11, stCpp11, stCpp14,
  stCpp17
}
 C++ standard enum. More...
 

Static Public Member Functions

static std::string getBinaryDirectory ()
 In very rare cases (examples requiring artefacts build in source checkouts), this is usefull. More...
 
static std::string getBuildDate ()
 Get the build date. More...
 
static std::string getBuildSystem ()
 Get the compiler host. More...
 
static std::string getBuildTarget ()
 Get the build target / architecture. More...
 
static std::string getBuildTime ()
 Get the build time. More...
 
static std::string getCMakeBuildType ()
 Get the build type. More...
 
static std::string getCMakeVersion ()
 Get the cmake version. More...
 
static std::string getCompilerId ()
 Get the C++ compiler id, see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html. More...
 
static std::string getCompilerVersion ()
 Get the compiler version. More...
 
static cppStandard getCppStandard ()
 Get the C++ standard in effect during compiling. More...
 
static std::string getCppStandardString ()
 Get the C++ standard in effect during compiling as a string. More...
 
static std::string getDescription ()
 Get a description of the build environment. More...
 
static std::string getProjectName ()
 Get the project name. More...
 
static std::string getProjectVersion ()
 Get the project version. More...
 
static int getProjectVersionMajor ()
 Get the project version major. More...
 
static int getProjectVersionMinor ()
 Get the project version minor. More...
 
static int getProjectVersionPatch ()
 Get the project version patch. More...
 
static std::string getSourceDirectory ()
 In rare cases (examples requiring artefacts build in source checkouts), this is usefull. More...
 

Detailed Description

Build information, generated by cmake during builds from buildenv.hpp.in.

  • CMAKE_CXX_COMPILER_ID GNU
  • CMAKE_CXX_COMPILER_VERSION 9.3.0
  • CMAKE_SYSTEM Linux-5.4.0-1043-azure
  • CMAKE_SYSTEM_PROCESSOR x86_64
  • PROJECT_NAME dodo
  • PROJECT_VERSION_STR 0.0.1
  • CMAKE_VERSION 3.20.0
  • CMAKE_BUILD_TYPE

Definition at line 20 of file buildenv.hpp.

Member Enumeration Documentation

◆ cppStandard

C++ standard enum.

Enumerator
stUnknown 

Unknown C++ standard.

stPreCpp11 

Before C++11.

stCpp11 

C++ 11.

stCpp14 

C++ 14.

stCpp17 

C++ 17.

Definition at line 115 of file buildenv.hpp.

Member Function Documentation

◆ getBinaryDirectory()

static std::string dodo::BuildEnv::getBinaryDirectory ( )
inlinestatic

In very rare cases (examples requiring artefacts build in source checkouts), this is usefull.

Returns
The source directory.

Definition at line 110 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getBuildDate()

static std::string dodo::BuildEnv::getBuildDate ( )
inlinestatic

Get the build date.

Returns
DATE.

Definition at line 92 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getBuildSystem()

static std::string dodo::BuildEnv::getBuildSystem ( )
inlinestatic

Get the compiler host.

Returns
CMAKE_SYSTEM.

Definition at line 38 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getBuildTarget()

static std::string dodo::BuildEnv::getBuildTarget ( )
inlinestatic

Get the build target / architecture.

Returns
CMAKE_SYSTEM_PROCESSOR.

Definition at line 44 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getBuildTime()

static std::string dodo::BuildEnv::getBuildTime ( )
inlinestatic

Get the build time.

Returns
TIME.

Definition at line 98 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getCMakeBuildType()

static std::string dodo::BuildEnv::getCMakeBuildType ( )
inlinestatic

Get the build type.

Returns
CMAKE_BUILD_TYPE.

Definition at line 86 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getCMakeVersion()

static std::string dodo::BuildEnv::getCMakeVersion ( )
inlinestatic

Get the cmake version.

Returns
CMAKE_VERSION.

Definition at line 80 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getCompilerId()

static std::string dodo::BuildEnv::getCompilerId ( )
inlinestatic

Get the C++ compiler id, see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html.

Returns
CMAKE_CXX_COMPILER_ID.

Definition at line 26 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getCompilerVersion()

static std::string dodo::BuildEnv::getCompilerVersion ( )
inlinestatic

Get the compiler version.

Returns
CMAKE_CXX_COMPILER_VERSION.

Definition at line 32 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getCppStandard()

static cppStandard dodo::BuildEnv::getCppStandard ( )
inlinestatic

Get the C++ standard in effect during compiling.

Returns
The cppStandard.

Definition at line 142 of file buildenv.hpp.

References stCpp11, stCpp14, stCpp17, stPreCpp11, and stUnknown.

Referenced by getCppStandardString().

Here is the caller graph for this function:

◆ getCppStandardString()

static std::string dodo::BuildEnv::getCppStandardString ( )
inlinestatic

Get the C++ standard in effect during compiling as a string.

Returns
The cppStandard as a string.

Definition at line 127 of file buildenv.hpp.

References getCppStandard(), stCpp11, stCpp14, stCpp17, stPreCpp11, and stUnknown.

Referenced by getDescription().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDescription()

static std::string dodo::BuildEnv::getDescription ( )
inlinestatic

Get a description of the build environment.

Returns
The description.

Definition at line 154 of file buildenv.hpp.

References getBinaryDirectory(), getBuildDate(), getBuildSystem(), getBuildTarget(), getBuildTime(), getCMakeBuildType(), getCMakeVersion(), getCompilerId(), getCompilerVersion(), getCppStandardString(), getProjectName(), getProjectVersion(), and getSourceDirectory().

Here is the call graph for this function:

◆ getProjectName()

static std::string dodo::BuildEnv::getProjectName ( )
inlinestatic

Get the project name.

Returns
PROJECT_NAME.

Definition at line 50 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getProjectVersion()

static std::string dodo::BuildEnv::getProjectVersion ( )
inlinestatic

Get the project version.

Returns
PROJECT_VERSION_STR.

Definition at line 56 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

◆ getProjectVersionMajor()

static int dodo::BuildEnv::getProjectVersionMajor ( )
inlinestatic

Get the project version major.

Returns
PROJECT_VERSION_MAJOR.

Definition at line 62 of file buildenv.hpp.

◆ getProjectVersionMinor()

static int dodo::BuildEnv::getProjectVersionMinor ( )
inlinestatic

Get the project version minor.

Returns
PROJECT_VERSION_MINOR.

Definition at line 68 of file buildenv.hpp.

◆ getProjectVersionPatch()

static int dodo::BuildEnv::getProjectVersionPatch ( )
inlinestatic

Get the project version patch.

Returns
PROJECT_VERSION_PATCH.

Definition at line 74 of file buildenv.hpp.

◆ getSourceDirectory()

static std::string dodo::BuildEnv::getSourceDirectory ( )
inlinestatic

In rare cases (examples requiring artefacts build in source checkouts), this is usefull.

Returns
The source directory.

Definition at line 104 of file buildenv.hpp.

Referenced by getDescription().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: