| 3275 | } |
| 3276 | |
| 3277 | std::string cmake::StripExtension(std::string const& file) const |
| 3278 | { |
| 3279 | auto dotpos = file.rfind('.'); |
| 3280 | if (dotpos != std::string::npos) { |
| 3281 | #if defined(_WIN32) || defined(__APPLE__) |
| 3282 | auto ext = cmSystemTools::LowerCase(file.substr(dotpos + 1)); |
| 3283 | #else |
| 3284 | auto ext = cm::string_view(file).substr(dotpos + 1); |
| 3285 | #endif |
| 3286 | if (this->IsAKnownExtension(ext)) { |
| 3287 | return file.substr(0, dotpos); |
| 3288 | } |
| 3289 | } |
| 3290 | return file; |
| 3291 | } |
| 3292 | |
| 3293 | cmValue cmake::GetCacheDefinition(std::string const& name) const |
| 3294 | { |
no test coverage detected