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

Method SetHomeDirectoryViaCommandLine

Source/cmake.cxx:2158–2172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2156#endif
2157
2158void cmake::SetHomeDirectoryViaCommandLine(std::string const& path)
2159{
2160 if (path.empty()) {
2161 return;
2162 }
2163
2164 auto prev_path = this->GetHomeDirectory();
2165 if (prev_path != path && !prev_path.empty() &&
2166 this->State->GetRole() == cmState::Role::Project) {
2167 this->IssueMessage(
2168 MessageType::WARNING,
2169 cmStrCat("Ignoring extra path from command line:\n \"", prev_path, '"'));
2170 }
2171 this->SetHomeDirectory(path);
2172}
2173
2174void cmake::SetHomeDirectory(std::string const& dir)
2175{

Callers 2

SetArgsMethod · 0.80

Calls 5

IssueMessageMethod · 0.95
SetHomeDirectoryMethod · 0.95
GetRoleMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected