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

Method EncodePath

Source/cmGlobalNinjaGenerator.cxx:197–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197std::string cmGlobalNinjaGenerator::EncodePath(std::string const& path)
198{
199 std::string result = path;
200#ifdef _WIN32
201 if (this->IsGCCOnWindows())
202 std::replace(result.begin(), result.end(), '\\', '/');
203 else
204 std::replace(result.begin(), result.end(), '/', '\\');
205#endif
206 this->EncodeLiteral(result);
207 cmSystemTools::ReplaceString(result, " ", "$ ");
208 cmSystemTools::ReplaceString(result, ":", "$:");
209 return result;
210}
211
212void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
213 cmNinjaBuild const& build,

Callers 4

WriteBuildMethod · 0.95
WriteNinjaWorkDirMethod · 0.80

Calls 3

IsGCCOnWindowsMethod · 0.95
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected