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

Function EnsureTrailingSlash

Source/cmGlobalNinjaGenerator.cxx:1172–1187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170}
1171
1172static void EnsureTrailingSlash(std::string& path)
1173{
1174 if (path.empty()) {
1175 return;
1176 }
1177 std::string::value_type last = path.back();
1178#ifdef _WIN32
1179 if (last != '\\') {
1180 path += '\\';
1181 }
1182#else
1183 if (last != '/') {
1184 path += '/';
1185 }
1186#endif
1187}
1188
1189std::string const& cmGlobalNinjaGenerator::ConvertToNinjaPath(
1190 std::string const& path) const

Callers 2

InitOutputPathPrefixMethod · 0.85

Calls 2

emptyMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…