MCPcopy Index your code
hub / github.com/Kitware/CMake / ReadCustomConfigurationFileTree

Method ReadCustomConfigurationFileTree

Source/cmCTest.cxx:2779–2813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2777}
2778
2779void cmCTest::ReadCustomConfigurationFileTree(std::string const& dir,
2780 cmMakefile* mf)
2781{
2782 cmCTestLog(this, DEBUG,
2783 "* Read custom CTest configuration directory: " << dir
2784 << std::endl);
2785
2786 auto const fname = [this, &dir]() -> std::string {
2787 for (char const* ext : { ".cmake", ".ctest" }) {
2788 std::string path = cmStrCat(dir, "/CTestCustom", ext);
2789 cmCTestLog(this, DEBUG, "* Check for file: " << path << std::endl);
2790 if (cmSystemTools::FileExists(path)) {
2791 return path;
2792 }
2793 }
2794 return "";
2795 }();
2796
2797 if (!fname.empty()) {
2798 cmCTestLog(this, DEBUG,
2799 "* Read custom CTest configuration file: " << fname
2800 << std::endl);
2801 bool erroroc = cmSystemTools::GetErrorOccurredFlag();
2802 cmSystemTools::ResetErrorOccurredFlag();
2803
2804 if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccurredFlag()) {
2805 cmCTestLog(this, ERROR_MESSAGE,
2806 "Problem reading custom configuration: " << fname
2807 << std::endl);
2808 }
2809 if (erroroc) {
2810 cmSystemTools::SetErrorOccurred();
2811 }
2812 }
2813}
2814
2815void cmCTest::PopulateCustomVector(cmMakefile* mf, std::string const& def,
2816 std::vector<std::string>& vec)

Callers 4

ProcessStepsMethod · 0.95
ExecuteTestsMethod · 0.95
InitialPassMethod · 0.80
InitialPassMethod · 0.80

Calls 4

cmStrCatFunction · 0.70
FileExistsFunction · 0.50
emptyMethod · 0.45
ReadListFileMethod · 0.45

Tested by

no test coverage detected