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

Function TopLevelCMakeVarCondSet

Source/cmProjectCommand.cxx:388–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388void TopLevelCMakeVarCondSet(cmMakefile& mf, std::string const& name,
389 std::string const& value)
390{
391 // Set the CMAKE_PROJECT_XXX variable to be the highest-level
392 // project name in the tree. If there are two project commands
393 // in the same CMakeLists.txt file, and it is the top level
394 // CMakeLists.txt file, then go with the last one.
395 if (!mf.GetDefinition(name) || mf.IsRootMakefile()) {
396 mf.RemoveDefinition(name);
397 mf.AddCacheDefinition(name, value, "Value Computed by CMake",
398 cmStateEnums::STATIC);
399 }
400}
401}

Callers 1

cmProjectCommandFunction · 0.85

Calls 4

GetDefinitionMethod · 0.45
IsRootMakefileMethod · 0.45
RemoveDefinitionMethod · 0.45
AddCacheDefinitionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…