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

Method ReadListFileAsString

Source/cmMakefile.cxx:833–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831}
832
833bool cmMakefile::ReadListFileAsString(std::string const& content,
834 std::string const& virtualFileName)
835{
836 std::string filenametoread = cmSystemTools::CollapseFullPath(
837 virtualFileName, this->GetCurrentSourceDirectory());
838
839 ListFileScope scope(this, filenametoread);
840
841 cmListFile listFile;
842 if (!listFile.ParseString(content, virtualFileName.c_str(),
843 this->GetMessenger(), this->Backtrace)) {
844 return false;
845 }
846
847#ifdef CMake_ENABLE_DEBUGGER
848 if (this->GetCMakeInstance()->GetDebugAdapter()) {
849 this->GetCMakeInstance()->GetDebugAdapter()->OnFileParsedSuccessfully(
850 filenametoread, listFile.Functions);
851 }
852#endif
853
854 this->RunListFile(listFile, filenametoread);
855 if (cmSystemTools::GetFatalErrorOccurred()) {
856 scope.Quiet();
857 }
858 return true;
859}
860
861void cmMakefile::RunListFile(cmListFile const& listFile,
862 std::string const& filenametoread,

Callers 1

Calls 8

GetMessengerMethod · 0.95
GetCMakeInstanceMethod · 0.95
RunListFileMethod · 0.95
c_strMethod · 0.80
GetDebugAdapterMethod · 0.80
ParseStringMethod · 0.45
QuietMethod · 0.45

Tested by

no test coverage detected