MCPcopy Create free account
hub / github.com/Kitware/CMake / ReadListFile

Method ReadListFile

Source/cmMakefile.cxx:792–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790};
791
792bool cmMakefile::ReadListFile(std::string const& filename)
793{
794 std::string filenametoread = cmSystemTools::CollapseFullPath(
795 filename, this->GetCurrentSourceDirectory());
796
797 ListFileScope scope(this, filenametoread);
798
799#ifdef CMake_ENABLE_DEBUGGER
800 if (this->GetCMakeInstance()->GetDebugAdapter()) {
801 this->GetCMakeInstance()->GetDebugAdapter()->OnBeginFileParse(
802 this, filenametoread);
803 }
804#endif
805
806 cmListFile listFile;
807 if (!listFile.ParseFile(filenametoread.c_str(), this->GetMessenger(),
808 this->Backtrace)) {
809#ifdef CMake_ENABLE_DEBUGGER
810 if (this->GetCMakeInstance()->GetDebugAdapter()) {
811 this->GetCMakeInstance()->GetDebugAdapter()->OnEndFileParse();
812 }
813#endif
814
815 return false;
816 }
817
818#ifdef CMake_ENABLE_DEBUGGER
819 if (this->GetCMakeInstance()->GetDebugAdapter()) {
820 this->GetCMakeInstance()->GetDebugAdapter()->OnEndFileParse();
821 this->GetCMakeInstance()->GetDebugAdapter()->OnFileParsedSuccessfully(
822 filenametoread, listFile.Functions);
823 }
824#endif
825
826 this->RunListFile(listFile, filenametoread);
827 if (cmSystemTools::GetFatalErrorOccurred()) {
828 scope.Quiet();
829 }
830 return true;
831}
832
833bool cmMakefile::ReadListFileAsString(std::string const& content,
834 std::string const& virtualFileName)

Callers

nothing calls this directly

Calls 10

GetCMakeInstanceMethod · 0.95
GetMessengerMethod · 0.95
RunListFileMethod · 0.95
GetDebugAdapterMethod · 0.80
OnBeginFileParseMethod · 0.80
c_strMethod · 0.80
OnEndFileParseMethod · 0.80
ParseFileMethod · 0.45
QuietMethod · 0.45

Tested by

no test coverage detected