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

Method SetHomeDirectory

Source/cmake.cxx:2174–2187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2172}
2173
2174void cmake::SetHomeDirectory(std::string const& dir)
2175{
2176 assert(!dir.empty());
2177 this->State->SetSourceDirectory(dir);
2178 if (this->CurrentSnapshot.IsValid()) {
2179 this->CurrentSnapshot.SetDefinition("CMAKE_SOURCE_DIR", dir);
2180 }
2181
2182 if (this->State->GetIsTryCompile() == cmState::TryCompile::No) {
2183 this->Messenger->SetTopSource(this->GetHomeDirectory());
2184 } else {
2185 this->Messenger->SetTopSource(cm::nullopt);
2186 }
2187}
2188
2189std::string const& cmake::GetHomeDirectory() const
2190{

Callers 12

FindPackageMethod · 0.95
SetArgsMethod · 0.95
BuildMethod · 0.95
WorkflowMethod · 0.95
LLVMFuzzerTestOneInputFunction · 0.80
TryCompileMethod · 0.80
cmcmd_cmake_ninja_dyndepFunction · 0.80
SetCacheArgsMethod · 0.80
ExecuteCMakeCommandMethod · 0.80
configureMethod · 0.80

Calls 6

SetDefinitionMethod · 0.80
GetIsTryCompileMethod · 0.80
SetTopSourceMethod · 0.80
emptyMethod · 0.45
SetSourceDirectoryMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected