rez
Public Member Functions | Public Attributes | List of all members
rez::Config Struct Reference

Config parameterizes rez builds. More...

#include <rez.hpp>

Public Member Functions

void ApplyMSVCToolchain () const
 ApplyMSVCToolchain loads MSVC environment variables for cl into the current process. More...
 
void Load ()
 Load populates build parameters according to the documented defaults and override mechanisms. More...
 

Public Attributes

std::filesystem::path cache_file_path { std::filesystem::path(CacheDir) / CacheFileBasename }
 
bool debug { false }
 debug controls whether additional logging is performed. (Default: false) More...
 
bool windows { false }
 windows denotes whether the runtime environment is (COMSPEC) Windows. (Default: Determined at runtime by Load) More...
 
std::filesystem::path task_definition_path { std::filesystem::path(TaskDefinitionCpp) }
 task_definition_path denotes the user's task definition source file. (Default: rez.cpp) More...
 
Lang task_definition_lang { Lang::Cpp }
 task_definition_lang denotes the programming language for the user's task definition source file. (Default: Lang::Cpp) More...
 
std::string compiler { std::string(DefaultCompilerUnixCpp) }
 compiler denotes the executable used to build the user task tree. (Default: Determined at runtime by Load) More...
 
std::filesystem::path artifact_dir_path { std::filesystem::path(CacheDir) / ArtifactDirBasename }
 artifact_dir_path denotes the path where rez binaries are housed (Default: std::filesystem::path(CacheDir) / ArtifactDirBasename) More...
 
std::filesystem::path artifact_file_path { std::filesystem::path("") }
 artifact_file_path denotes the binary path where user task executable shall be generated (Default: Determined at runtime by Load) More...
 
std::string build_command {}
 build_command denotes the compilation step for the user task source file (Default: Determined at runtime by Load) More...
 

Detailed Description

Config parameterizes rez builds.

Member Function Documentation

◆ ApplyMSVCToolchain()

void rez::Config::ApplyMSVCToolchain ( ) const

ApplyMSVCToolchain loads MSVC environment variables for cl into the current process.

By default, the target architecture x64 is assumed. Set a environment variable REZ_ARCH to override.

Exceptions
anerror in the event of a problem

◆ Load()

void rez::Config::Load ( )

Load populates build parameters according to the documented defaults and override mechanisms.

Exceptions
anerror in the event of a problem

Member Data Documentation

◆ artifact_dir_path

std::filesystem::path rez::Config::artifact_dir_path { std::filesystem::path(CacheDir) / ArtifactDirBasename }

artifact_dir_path denotes the path where rez binaries are housed (Default: std::filesystem::path(CacheDir) / ArtifactDirBasename)

Examples:

  • std::filesystem::path(".rez") / "bin"

◆ artifact_file_path

std::filesystem::path rez::Config::artifact_file_path { std::filesystem::path("") }

artifact_file_path denotes the binary path where user task executable shall be generated (Default: Determined at runtime by Load)

Examples:

  • std::filesystem::path(".rez") / "bin" / "rez"
  • std::filesystem::path(".rez") / "bin" / "rez.exe"

◆ build_command

std::string rez::Config::build_command {}

build_command denotes the compilation step for the user task source file (Default: Determined at runtime by Load)

Examples:

  • "c++ -o .rez/bin/rez rez.cpp"s
  • R"(cl rez.cpp /link /out:.rez\bin\rez.exe)"s

◆ cache_file_path

std::filesystem::path rez::Config::cache_file_path { std::filesystem::path(CacheDir) / CacheFileBasename }

◆ compiler

std::string rez::Config::compiler { std::string(DefaultCompilerUnixCpp) }

compiler denotes the executable used to build the user task tree. (Default: Determined at runtime by Load)

Examples:

  • "c++"s
  • "cc"s
  • "cl"s
  • "clang++"s
  • "clang"s
  • "g++"s
  • "gcc"s

◆ debug

bool rez::Config::debug { false }

debug controls whether additional logging is performed. (Default: false)

Examples:

  • false
  • true

◆ task_definition_lang

Lang rez::Config::task_definition_lang { Lang::Cpp }

task_definition_lang denotes the programming language for the user's task definition source file. (Default: Lang::Cpp)

Examples:

◆ task_definition_path

std::filesystem::path rez::Config::task_definition_path { std::filesystem::path(TaskDefinitionCpp) }

task_definition_path denotes the user's task definition source file. (Default: rez.cpp)

If no rez.cpp file is present, then rez.c is checked as a fallback.

Examples:

  • std::filesystem::path("rez.cpp")
  • std::filesystem::path("rez.c")

◆ windows

bool rez::Config::windows { false }

windows denotes whether the runtime environment is (COMSPEC) Windows. (Default: Determined at runtime by Load)

Examples:

  • false
  • true

The documentation for this struct was generated from the following files: