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

Method ReadListFile

Source/cmake.cxx:811–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809}
810
811void cmake::ReadListFile(std::vector<std::string> const& args,
812 std::string const& path)
813{
814 // if a generator was not yet created, temporarily create one
815 cmGlobalGenerator* gg = this->GetGlobalGenerator();
816
817 // if a generator was not specified use a generic one
818 std::unique_ptr<cmGlobalGenerator> gen;
819 if (!gg) {
820 gen = cm::make_unique<cmGlobalGenerator>(this);
821 gg = gen.get();
822 }
823
824 // read in the list file to fill the cache
825 if (!path.empty()) {
826 this->CurrentSnapshot = this->State->Reset();
827 cmStateSnapshot snapshot = this->GetCurrentSnapshot();
828 snapshot.GetDirectory().SetCurrentBinary(this->GetHomeOutputDirectory());
829 snapshot.GetDirectory().SetCurrentSource(this->GetHomeDirectory());
830 snapshot.SetDefaultDefinitions();
831 cmMakefile mf(gg, snapshot);
832 if (this->State->GetRole() == cmState::Role::Script) {
833 mf.SetScriptModeFile(path);
834 mf.SetArgcArgv(args);
835 }
836 if (!cmSystemTools::FileExists(path, true)) {
837 cmSystemTools::Error("Not a file: " + path);
838 }
839 if (!mf.ReadListFile(path)) {
840 cmSystemTools::Error("Error processing file: " + path);
841 }
842 }
843}
844
845bool cmake::FindPackage(std::vector<std::string> const& args)
846{

Callers 12

PreLoadCMakeFilesMethod · 0.95
FindMakeProgramMethod · 0.45
EnableLanguageMethod · 0.45
UpdateDependenciesMethod · 0.45
ScanDependenciesMethod · 0.45
ClearDependenciesMethod · 0.45
ReadSettingsMethod · 0.45
GetOSReleaseVariablesFunction · 0.45
SetCacheArgsMethod · 0.45
FindPackageMethod · 0.45
CheckBuildSystemMethod · 0.45

Calls 14

GetGlobalGeneratorMethod · 0.95
GetCurrentSnapshotMethod · 0.95
SetCurrentBinaryMethod · 0.80
SetCurrentSourceMethod · 0.80
SetDefaultDefinitionsMethod · 0.80
GetRoleMethod · 0.80
SetScriptModeFileMethod · 0.80
SetArgcArgvMethod · 0.80
ErrorClass · 0.70
FileExistsFunction · 0.50
getMethod · 0.45
emptyMethod · 0.45

Tested by 1