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

Function AnyOutputMatches

Source/cmLocalGenerator.cxx:5046–5057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5044}
5045
5046bool AnyOutputMatches(std::string const& name,
5047 std::vector<std::string> const& outputs)
5048{
5049 return std::any_of(outputs.begin(), outputs.end(),
5050 [&name](std::string const& output) -> bool {
5051 std::string::size_type pos = output.rfind(name);
5052 // If the output matches exactly
5053 return (pos != std::string::npos &&
5054 pos == output.size() - name.size() &&
5055 (pos == 0 || output[pos - 1] == '/'));
5056 });
5057}
5058
5059bool AnyTargetCommandOutputMatches(
5060 std::string const& name, std::vector<cmCustomCommand> const& commands)

Callers 2

Calls 4

rfindMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…