| 707 | } |
| 708 | |
| 709 | bool HandleTargetMode(cmExecutionStatus& status, |
| 710 | std::set<std::string> const& names, |
| 711 | std::string const& propertyName, |
| 712 | std::string const& propertyValue, bool appendAsString, |
| 713 | bool appendMode, bool remove) |
| 714 | { |
| 715 | for (std::string const& name : names) { |
| 716 | if (status.GetMakefile().IsAlias(name)) { |
| 717 | status.SetError("can not be used on an ALIAS target."); |
| 718 | return false; |
| 719 | } |
| 720 | |
| 721 | if (cmTarget* target = status.GetMakefile().FindTargetToUse(name)) { |
| 722 | if (target->IsSymbolic()) { |
| 723 | status.SetError("can not be used on a SYMBOLIC target."); |
| 724 | return false; |
| 725 | } |
| 726 | |
| 727 | // Handle the current target. |
| 728 | if (!HandleTarget(target, status.GetMakefile(), propertyName, |
| 729 | propertyValue, appendAsString, appendMode, remove)) { |
| 730 | return false; |
| 731 | } |
| 732 | } else { |
| 733 | status.SetError(cmStrCat("could not find TARGET ", name, |
| 734 | ". Perhaps it has not yet been created.")); |
| 735 | return false; |
| 736 | } |
| 737 | } |
| 738 | return true; |
| 739 | } |
| 740 | |
| 741 | bool HandleTarget(cmTarget* target, cmMakefile& makefile, |
| 742 | std::string const& propertyName, |
no test coverage detected
searching dependent graphs…