| 261 | } |
| 262 | |
| 263 | void cmSourceFile::CheckExtension() |
| 264 | { |
| 265 | // Compute the extension. |
| 266 | cm::string_view realExt = |
| 267 | cmSystemTools::GetFilenameLastExtensionView(this->FullPath); |
| 268 | if (!realExt.empty()) { |
| 269 | // Store the extension without the leading '.'. |
| 270 | this->Extension = std::string(realExt.substr(1)); |
| 271 | } |
| 272 | |
| 273 | // Look for object files. |
| 274 | if (this->Extension == "obj" || this->Extension == "o" || |
| 275 | this->Extension == "lo") { |
| 276 | this->SetProperty("EXTERNAL_OBJECT", "1"); |
| 277 | } |
| 278 | |
| 279 | // Try to identify the source file language from the extension. |
| 280 | if (this->Language.empty()) { |
| 281 | this->CheckLanguage(this->Extension); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | void cmSourceFile::CheckLanguage(cm::string_view ext) |
| 286 | { |
no test coverage detected