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

Method SelectDefaultSearchModes

Source/cmFindCommon.cxx:213–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void cmFindCommon::SelectDefaultSearchModes()
214{
215 std::array<std::pair<bool&, std::string>, 6> const search_paths = {
216 { { this->NoPackageRootPath, "CMAKE_FIND_USE_PACKAGE_ROOT_PATH" },
217 { this->NoCMakePath, "CMAKE_FIND_USE_CMAKE_PATH" },
218 { this->NoCMakeEnvironmentPath,
219 "CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH" },
220 { this->NoSystemEnvironmentPath,
221 "CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH" },
222 { this->NoCMakeSystemPath, "CMAKE_FIND_USE_CMAKE_SYSTEM_PATH" },
223 { this->NoCMakeInstallPath, "CMAKE_FIND_USE_INSTALL_PREFIX" } }
224 };
225
226 for (auto const& path : search_paths) {
227 cmValue def = this->Makefile->GetDefinition(path.second);
228 if (def) {
229 path.first = !def.IsOn();
230 }
231 }
232}
233
234void cmFindCommon::RerootPaths(std::vector<std::string>& paths,
235 std::string* debugBuffer)

Callers 2

InitialPassMethod · 0.80
ParseArgumentsMethod · 0.80

Calls 2

GetDefinitionMethod · 0.45
IsOnMethod · 0.45

Tested by

no test coverage detected