| 1651 | } |
| 1652 | |
| 1653 | std::string cmCPackGenerator::GetComponentPackageFileName( |
| 1654 | std::string const& initialPackageFileName, |
| 1655 | std::string const& groupOrComponentName, bool isGroupName) |
| 1656 | { |
| 1657 | |
| 1658 | /* |
| 1659 | * the default behavior is to use the |
| 1660 | * component [group] name as a suffix |
| 1661 | */ |
| 1662 | std::string suffix = "-" + groupOrComponentName; |
| 1663 | /* check if we should use DISPLAY name */ |
| 1664 | std::string dispNameVar = |
| 1665 | "CPACK_" + this->Name + "_USE_DISPLAY_NAME_IN_FILENAME"; |
| 1666 | if (this->IsOn(dispNameVar)) { |
| 1667 | /* the component Group case */ |
| 1668 | if (isGroupName) { |
| 1669 | std::string groupDispVar = "CPACK_COMPONENT_GROUP_" + |
| 1670 | cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME"; |
| 1671 | cmValue groupDispName = this->GetOption(groupDispVar); |
| 1672 | if (groupDispName) { |
| 1673 | suffix = "-" + *groupDispName; |
| 1674 | } |
| 1675 | } |
| 1676 | /* the [single] component case */ |
| 1677 | else { |
| 1678 | std::string dispVar = "CPACK_COMPONENT_" + |
| 1679 | cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME"; |
| 1680 | cmValue dispName = this->GetOption(dispVar); |
| 1681 | if (dispName) { |
| 1682 | suffix = "-" + *dispName; |
| 1683 | } |
| 1684 | } |
| 1685 | } |
| 1686 | return initialPackageFileName + suffix; |
| 1687 | } |
| 1688 | |
| 1689 | enum cmCPackGenerator::CPackSetDestdirSupport |
| 1690 | cmCPackGenerator::SupportsSetDestdir() const |
no test coverage detected