| 4165 | } |
| 4166 | |
| 4167 | std::string cmLocalGenerator::CreateSafeObjectFileName( |
| 4168 | std::string const& sin) const |
| 4169 | { |
| 4170 | // Start with the original name. |
| 4171 | std::string ssin = sin; |
| 4172 | |
| 4173 | // Avoid full paths by removing leading slashes. |
| 4174 | ssin.erase(0, ssin.find_first_not_of('/')); |
| 4175 | |
| 4176 | // Avoid full paths by removing colons. |
| 4177 | std::replace(ssin.begin(), ssin.end(), ':', '_'); |
| 4178 | |
| 4179 | // Avoid relative paths that go up the tree. |
| 4180 | cmSystemTools::ReplaceString(ssin, "../", "__/"); |
| 4181 | |
| 4182 | // Avoid spaces. |
| 4183 | std::replace(ssin.begin(), ssin.end(), ' ', '_'); |
| 4184 | |
| 4185 | return ssin; |
| 4186 | } |
| 4187 | |
| 4188 | void cmLocalGenerator::ComputeSourceGroupSearchIndex() |
| 4189 | { |
no test coverage detected