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

Method NormalizePath

Source/cmBinUtilsLinker.cxx:25–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25void cmBinUtilsLinker::NormalizePath(std::string& path) const
26{
27 std::string normalizedPath =
28 cmCMakePath(path, cmCMakePath::auto_format).GenericString();
29
30 if (path == normalizedPath) {
31 return;
32 }
33
34 cmPolicies::PolicyStatus policy =
35 this->Archive->GetMakefile()->GetPolicyStatus(cmPolicies::CMP0207);
36 if (policy == cmPolicies::WARN) {
37 this->Archive->GetMakefile()->IssueMessage(
38 MessageType::AUTHOR_WARNING,
39 cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0207),
40 "\n"
41 "Path\n \"",
42 path,
43 "\"\n"
44 "would be converted to\n \"",
45 normalizedPath, "\"\n"));
46 } else if (policy == cmPolicies::NEW) {
47 path = std::move(normalizedPath);
48 }
49}

Callers 6

ResolveDependencyMethod · 0.45
ResolveDependencyMethod · 0.45
ResolveDependencyMethod · 0.45

Calls 7

cmCMakePathClass · 0.85
moveFunction · 0.85
GenericStringMethod · 0.80
cmStrCatFunction · 0.70
GetPolicyStatusMethod · 0.45
GetMakefileMethod · 0.45
IssueMessageMethod · 0.45

Tested by

no test coverage detected