MCPcopy Create free account
hub / github.com/Kitware/CMake / setENV

Function setENV

Source/cmSetCommand.cxx:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24namespace {
25void setENV(std::string const& var, cm::string_view val)
26{
27#ifdef _WIN32
28 if (val.empty()) {
29 // FIXME(#27285): On Windows, PutEnv previously treated empty as unset.
30 // KWSys was fixed, but we need to retain the behavior for compatibility.
31 cmSystemTools::UnPutEnv(var);
32 return;
33 }
34#endif
35 cmSystemTools::PutEnv(cmStrCat(var, '=', val));
36}
37}
38
39// cmSetCommand

Callers 1

cmSetCommandFunction · 0.85

Calls 2

cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…