Loading...
Searching...
No Matches
seams::cfg Namespace Reference

Classes

struct  Runtime

Functions

std::string pathFromArgv (int argc, char **argv)
 Scan argv for –config PATH / –config=PATH.
void applyFile (const std::string &path, bool required)
 Apply a dotenv file: set KEY=VAL only when KEY is not already in the environment.
Runtime load (std::string_view explicitFile={})
 Load file (if any) then read the environment into a Runtime.
void exportEnviron (const Runtime &cfg)
 Write Runtime fields into the environment so libraries that only call getenv (linkcell, OpenMP offload) see the CLI result.
void dump (const Runtime &cfg, std::ostream &os)

Function Documentation

◆ applyFile()

void seams::cfg::applyFile ( const std::string & path,
bool required )

Apply a dotenv file: set KEY=VAL only when KEY is not already in the environment.

Throws if required and the file is missing.

◆ dump()

void seams::cfg::dump ( const Runtime & cfg,
std::ostream & os )

◆ exportEnviron()

void seams::cfg::exportEnviron ( const Runtime & cfg)

Write Runtime fields into the environment so libraries that only call getenv (linkcell, OpenMP offload) see the CLI result.

◆ load()

Runtime seams::cfg::load ( std::string_view explicitFile = {})

Load file (if any) then read the environment into a Runtime.

◆ pathFromArgv()

std::string seams::cfg::pathFromArgv ( int argc,
char ** argv )

Scan argv for –config PATH / –config=PATH.

Empty if absent.