rez
Classes | Enumerations | Functions | Variables
rez Namespace Reference

rez manages C++ tasks. More...

Classes

struct  Config
 Config parameterizes rez builds. More...
 

Enumerations

enum  Lang { Lang::Cpp, Lang::C }
 Lang denotes a programming language. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Lang &o)
 << formats a Lang to an ostream. More...
 
std::filesystem::path ApplyBinaryExtension (const std::filesystem::path &basename, bool windows)
 ApplyBinaryExtension applies OS-appropriate file extensions to binaries. More...
 
std::optional< std::string > GetEnvironmentVariable (const std::string &key)
 GetEnvironmentVariable retrieves environment variables. More...
 
bool DetectWindowsEnvironment ()
 DetectWindowsEnvironment determines whether the runtime environment is (COMSPEC) Windows. More...
 
std::ostream & operator<< (std::ostream &os, const Config &o)
 << formats a Config to an ostream. More...
 

Variables

constexpr char Version [] { "0.0.11" }
 Version is semver. More...
 
constexpr char TaskDefinitionCpp [] { "rez.cpp" }
 TaskDefinitionCpp denotes the path to a C++ task definition source file. More...
 
constexpr char TaskDefinitionC [] { "rez.c" }
 TaskDefinitionC denotes the path to a C task definition source file. More...
 
constexpr char CacheDir [] { ".rez" }
 CacheDir denotes the path to the rez internal cache directory. More...
 
constexpr char CacheFileBasename [] { "rez-env.txt" }
 CacheFileBasename denotes the basename of the internal rez cache file. More...
 
constexpr char ArtifactDirBasename [] { "bin" }
 ArtifactDirBaename denotes the path insode of CacheDir where artifacts are housed. More...
 
constexpr char ArtifactFileBasenameUnix [] { "delegate-rez" }
 ArtifactFileBasenameUnix denotes the basename of user task binaries generated by UNIX compilers. More...
 
constexpr char DefaultCompilerWindows [] { "cl" }
 DefaultCompilerWindows denotes the standard Microsoft Visual C++ (MSVC) compiler executable basename. More...
 
constexpr char DefaultCompilerUnixCpp [] { "c++" }
 DefaultCompilerUnixCpp denotes the standard UNIX C++ compiler executable basename. More...
 
constexpr char DefaultCompilerUnixC [] { "cc" }
 DefaultCompilerUnixC denotes the standard UNIX C compiler executable basename. More...
 
constexpr char DefaultMSVCToolchainQueryScript [] { R"(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat)" }
 DefaultMSVCToolchainQueryScript denotes the standard script which prepares environment variables for executing MSVC cl commands. More...
 
constexpr char ArchitectureMsvcAmd64 [] { "x64" }
 ArchitectureMsvcAmd64 denotes the amd64 architecture in MSVC nomenclature. More...
 

Detailed Description

rez manages C++ tasks.

Enumeration Type Documentation

◆ Lang

enum rez::Lang
strong

Lang denotes a programming language.

Enumerator
Cpp 

Cpp denotes C++, object oriented C.

C denotes C, the successor to BCPL.

Function Documentation

◆ ApplyBinaryExtension()

std::filesystem::path rez::ApplyBinaryExtension ( const std::filesystem::path &  basename,
bool  windows 
)

ApplyBinaryExtension applies OS-appropriate file extensions to binaries.

Parameters
basenamepath to a binary, without any file extension
windowswhether the context is (COMSPEC) Windows
Returns
a copy of the path with the OS-appropriate file extension

◆ DetectWindowsEnvironment()

bool rez::DetectWindowsEnvironment ( )

DetectWindowsEnvironment determines whether the runtime environment is (COMSPEC) Windows.

Returns
true when COMSPEC Windows is detected.

Native Command Prompt and PowerShell environments are expected to evaluate as Windows.

Cygwin-style environments, such as Windows Subsystem for Linux, Cygwin, MinGW, MSYS2, Git Bash, Strawberry Perl, etc., are expected to evaluate as not Windows.

◆ GetEnvironmentVariable()

std::optional< std::string > rez::GetEnvironmentVariable ( const std::string &  key)

GetEnvironmentVariable retrieves environment variables.

Parameters
keythe name of an environment variable
Returns
std::nullopt on missing environment variables

◆ operator<<() [1/2]

std::ostream & rez::operator<< ( std::ostream &  os,
const Config o 
)

<< formats a Config to an ostream.

Parameters
osan output stream
oa Config
Returns
the output stream result

◆ operator<<() [2/2]

std::ostream & rez::operator<< ( std::ostream &  os,
const Lang o 
)

<< formats a Lang to an ostream.

Parameters
osan output stream
oa Lang
Returns
the output stream result

Variable Documentation

◆ ArchitectureMsvcAmd64

constexpr char rez::ArchitectureMsvcAmd64[] { "x64" }
constexpr

ArchitectureMsvcAmd64 denotes the amd64 architecture in MSVC nomenclature.

◆ ArtifactDirBasename

constexpr char rez::ArtifactDirBasename[] { "bin" }
constexpr

ArtifactDirBaename denotes the path insode of CacheDir where artifacts are housed.

◆ ArtifactFileBasenameUnix

constexpr char rez::ArtifactFileBasenameUnix[] { "delegate-rez" }
constexpr

ArtifactFileBasenameUnix denotes the basename of user task binaries generated by UNIX compilers.

◆ CacheDir

constexpr char rez::CacheDir[] { ".rez" }
constexpr

CacheDir denotes the path to the rez internal cache directory.

◆ CacheFileBasename

constexpr char rez::CacheFileBasename[] { "rez-env.txt" }
constexpr

CacheFileBasename denotes the basename of the internal rez cache file.

◆ DefaultCompilerUnixC

constexpr char rez::DefaultCompilerUnixC[] { "cc" }
constexpr

DefaultCompilerUnixC denotes the standard UNIX C compiler executable basename.

The compiler may be overridden by supplying a non-blank value to the CFLAGS environment variable.

Custom flags may be passed to the compiler via a CPPFLAGS and/or CFLAGS environment variable.

◆ DefaultCompilerUnixCpp

constexpr char rez::DefaultCompilerUnixCpp[] { "c++" }
constexpr

DefaultCompilerUnixCpp denotes the standard UNIX C++ compiler executable basename.

The compiler may be overridden by supplying a non-blank value to the CXX environment variable.

Custom flags may be passed to the compiler via a CPPFLAGS and/or CXXFLAGS environment variable.

◆ DefaultCompilerWindows

constexpr char rez::DefaultCompilerWindows[] { "cl" }
constexpr

DefaultCompilerWindows denotes the standard Microsoft Visual C++ (MSVC) compiler executable basename.

This compiler is activated automatically when the runtime environment is detected as (COMSPEC) Windows.

The compiler may be overridden by supplying a non-blank value to the CXX environment variable.

Custom flags may be passed to the compiler via a CPPFLAGS or CXXFLAGS environment variable.

◆ DefaultMSVCToolchainQueryScript

constexpr char rez::DefaultMSVCToolchainQueryScript[] { R"(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat)" }
constexpr

DefaultMSVCToolchainQueryScript denotes the standard script which prepares environment variables for executing MSVC cl commands.

To override this, set a REZ_TOOLCHAIN_QUERY_PATH environment variable.

◆ TaskDefinitionC

constexpr char rez::TaskDefinitionC[] { "rez.c" }
constexpr

TaskDefinitionC denotes the path to a C task definition source file.

◆ TaskDefinitionCpp

constexpr char rez::TaskDefinitionCpp[] { "rez.cpp" }
constexpr

TaskDefinitionCpp denotes the path to a C++ task definition source file.

◆ Version

constexpr char rez::Version[] { "0.0.11" }
constexpr

Version is semver.