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

Function getSourceGroupFilesPaths

Source/cmSourceGroupCommand.cxx:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30std::string const kSourceGroupOptionName = "<sg_name>";
31
32std::set<std::string> getSourceGroupFilesPaths(
33 std::string const& root, std::vector<std::string> const& files)
34{
35 std::set<std::string> ret;
36 std::string::size_type const rootLength = root.length();
37
38 for (std::string const& file : files) {
39 ret.insert(file.substr(rootLength + 1)); // +1 to also omnit last '/'
40 }
41
42 return ret;
43}
44
45bool rootIsPrefix(std::string const& root,
46 std::vector<std::string> const& files, std::string& error)

Callers 1

processTreeFunction · 0.85

Calls 3

lengthMethod · 0.80
insertMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…