| 666 | } |
| 667 | |
| 668 | bool cmMakefile::ReadDependentFile(std::string const& filename, |
| 669 | bool noPolicyScope) |
| 670 | { |
| 671 | std::string filenametoread = cmSystemTools::CollapseFullPath( |
| 672 | filename, this->GetCurrentSourceDirectory()); |
| 673 | |
| 674 | IncludeScope incScope(this, filenametoread, noPolicyScope); |
| 675 | |
| 676 | #ifdef CMake_ENABLE_DEBUGGER |
| 677 | if (this->GetCMakeInstance()->GetDebugAdapter()) { |
| 678 | this->GetCMakeInstance()->GetDebugAdapter()->OnBeginFileParse( |
| 679 | this, filenametoread); |
| 680 | } |
| 681 | #endif |
| 682 | |
| 683 | cmListFile listFile; |
| 684 | if (!listFile.ParseFile(filenametoread.c_str(), this->GetMessenger(), |
| 685 | this->Backtrace)) { |
| 686 | #ifdef CMake_ENABLE_DEBUGGER |
| 687 | if (this->GetCMakeInstance()->GetDebugAdapter()) { |
| 688 | this->GetCMakeInstance()->GetDebugAdapter()->OnEndFileParse(); |
| 689 | } |
| 690 | #endif |
| 691 | |
| 692 | return false; |
| 693 | } |
| 694 | |
| 695 | #ifdef CMake_ENABLE_DEBUGGER |
| 696 | if (this->GetCMakeInstance()->GetDebugAdapter()) { |
| 697 | this->GetCMakeInstance()->GetDebugAdapter()->OnEndFileParse(); |
| 698 | this->GetCMakeInstance()->GetDebugAdapter()->OnFileParsedSuccessfully( |
| 699 | filenametoread, listFile.Functions); |
| 700 | } |
| 701 | #endif |
| 702 | |
| 703 | this->RunListFile(listFile, filenametoread); |
| 704 | if (cmSystemTools::GetFatalErrorOccurred()) { |
| 705 | incScope.Quiet(); |
| 706 | } |
| 707 | return true; |
| 708 | } |
| 709 | |
| 710 | class cmMakefile::ListFileScope : public FileScopeBase |
| 711 | { |