| 2777 | } |
| 2778 | |
| 2779 | void 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 | |
| 2815 | void cmCTest::PopulateCustomVector(cmMakefile* mf, std::string const& def, |
| 2816 | std::vector<std::string>& vec) |
no test coverage detected