| 456 | } |
| 457 | |
| 458 | std::string cmNinjaTargetGenerator::GetPreprocessedFilePath( |
| 459 | cmSourceFile const* source, std::string const& config) const |
| 460 | { |
| 461 | // Choose an extension to compile already-preprocessed source. |
| 462 | std::string ppExt = source->GetExtension(); |
| 463 | if (cmHasPrefix(ppExt, 'F')) { |
| 464 | // Some Fortran compilers automatically enable preprocessing for |
| 465 | // upper-case extensions. Since the source is already preprocessed, |
| 466 | // use a lower-case extension. |
| 467 | ppExt = cmSystemTools::LowerCase(ppExt); |
| 468 | } |
| 469 | if (ppExt == "fpp") { |
| 470 | // Some Fortran compilers automatically enable preprocessing for |
| 471 | // the ".fpp" extension. Since the source is already preprocessed, |
| 472 | // use the ".f" extension. |
| 473 | ppExt = "f"; |
| 474 | } |
| 475 | |
| 476 | // Take the object file name and replace the extension. |
| 477 | std::string const& objName = this->GeneratorTarget->GetObjectName(source); |
| 478 | std::string const& objExt = |
| 479 | this->GetGlobalGenerator()->GetLanguageOutputExtension(*source); |
| 480 | assert(objName.size() >= objExt.size()); |
| 481 | std::string const ppName = |
| 482 | cmStrCat(objName.substr(0, objName.size() - objExt.size()), "-pp.", ppExt); |
| 483 | |
| 484 | return cmStrCat(this->GetObjectFileDir(config), '/', ppName); |
| 485 | } |
| 486 | |
| 487 | std::string cmNinjaTargetGenerator::GetDyndepFilePath( |
| 488 | std::string const& lang, std::string const& config) const |
no test coverage detected