| 863 | } |
| 864 | |
| 865 | bool HandleTestMode(cmExecutionStatus& status, std::set<std::string>& names, |
| 866 | std::string const& propertyName, |
| 867 | std::string const& propertyValue, bool appendAsString, |
| 868 | bool appendMode, bool remove, cmMakefile* test_makefile) |
| 869 | { |
| 870 | // Look for tests with all names given. |
| 871 | std::set<std::string>::iterator next; |
| 872 | for (auto ni = names.begin(); ni != names.end(); ni = next) { |
| 873 | next = ni; |
| 874 | ++next; |
| 875 | if (cmTest* test = test_makefile->GetTest(*ni)) { |
| 876 | if (HandleTest(test, propertyName, propertyValue, appendAsString, |
| 877 | appendMode, remove)) { |
| 878 | names.erase(ni); |
| 879 | } else { |
| 880 | return false; |
| 881 | } |
| 882 | } |
| 883 | } |
| 884 | |
| 885 | // Names that are still left were not found. |
| 886 | if (!names.empty()) { |
| 887 | std::ostringstream e; |
| 888 | e << "given TEST names that do not exist:\n"; |
| 889 | for (std::string const& name : names) { |
| 890 | e << " " << name << "\n"; |
| 891 | } |
| 892 | status.SetError(e.str()); |
| 893 | return false; |
| 894 | } |
| 895 | return true; |
| 896 | } |
| 897 | |
| 898 | bool HandleTest(cmTest* test, std::string const& propertyName, |
| 899 | std::string const& propertyValue, bool appendAsString, |
no test coverage detected
searching dependent graphs…