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

Function HandleTestMode

Source/cmSetPropertyCommand.cxx:865–896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865bool 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
898bool HandleTest(cmTest* test, std::string const& propertyName,
899 std::string const& propertyValue, bool appendAsString,

Callers 1

cmSetPropertyCommandFunction · 0.70

Calls 8

HandleTestFunction · 0.85
eraseMethod · 0.80
strMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
GetTestMethod · 0.45
emptyMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…