Operator evaluating the predicate
| 110 | |
| 111 | // Operator evaluating the predicate |
| 112 | bool operator()(std::string const& p) const |
| 113 | { |
| 114 | auto path = cmCMakePath(p).Normal(); |
| 115 | |
| 116 | // Keep all relative paths: |
| 117 | if (path.IsRelative()) { |
| 118 | return false; |
| 119 | } |
| 120 | |
| 121 | // If it's an absolute path, check if it starts with the source |
| 122 | // directory: |
| 123 | return !(cmCMakePath(this->SourceDir).IsPrefix(path) || |
| 124 | cmCMakePath(this->BinaryDir).IsPrefix(path)); |
| 125 | } |
| 126 | |
| 127 | private: |
| 128 | // The path to the source directory |
nothing calls this directly
no test coverage detected