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

Function HandleDirectoryMode

Source/cmInstallCommand.cxx:1631–1941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1629}
1630
1631bool HandleDirectoryMode(std::vector<std::string> const& args,
1632 cmExecutionStatus& status)
1633{
1634 Helper helper(status);
1635
1636 enum Doing
1637 {
1638 DoingNone,
1639 DoingDirs,
1640 DoingDestination,
1641 DoingPattern,
1642 DoingRegex,
1643 DoingPermsFile,
1644 DoingPermsDir,
1645 DoingPermsMatch,
1646 DoingConfigurations,
1647 DoingComponent,
1648 DoingType
1649 };
1650 Doing doing = DoingDirs;
1651 bool in_match_mode = false;
1652 bool optional = false;
1653 bool exclude_from_all = false;
1654 bool message_never = false;
1655 std::vector<std::string> dirs;
1656 cm::optional<std::string> destination;
1657 std::string permissions_file;
1658 std::string permissions_dir;
1659 std::vector<std::string> configurations;
1660 std::string component = helper.DefaultComponentName;
1661 std::string literal_args;
1662 std::string type;
1663 for (unsigned int i = 1; i < args.size(); ++i) {
1664 if (args[i] == "DESTINATION") {
1665 if (in_match_mode) {
1666 status.SetError(cmStrCat(args[0], " does not allow \"", args[i],
1667 "\" after PATTERN or REGEX."));
1668 return false;
1669 }
1670
1671 // Switch to setting the destination property.
1672 doing = DoingDestination;
1673 } else if (args[i] == "TYPE") {
1674 if (in_match_mode) {
1675 status.SetError(cmStrCat(args[0], " does not allow \"", args[i],
1676 "\" after PATTERN or REGEX."));
1677 return false;
1678 }
1679
1680 // Switch to setting the type.
1681 doing = DoingType;
1682 } else if (args[i] == "OPTIONAL") {
1683 if (in_match_mode) {
1684 status.SetError(cmStrCat(args[0], " does not allow \"", args[i],
1685 "\" after PATTERN or REGEX."));
1686 return false;
1687 }
1688

Callers

nothing calls this directly

Calls 15

moveFunction · 0.85
cmCMakePathClass · 0.85
push_backMethod · 0.80
NormalMethod · 0.80
has_valueMethod · 0.80
emplace_backMethod · 0.80
GetDestinationForTypeMethod · 0.80
AddInstallComponentMethod · 0.80
cmStrCatFunction · 0.70
FileExistsFunction · 0.50
sizeMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…