| 4005 | } |
| 4006 | |
| 4007 | std::string cmLocalGenerator::ConstructComment( |
| 4008 | cmCustomCommandGenerator const& ccg, char const* default_comment) const |
| 4009 | { |
| 4010 | // Check for a comment provided with the command. |
| 4011 | if (cm::optional<std::string> comment = ccg.GetComment()) { |
| 4012 | return *comment; |
| 4013 | } |
| 4014 | |
| 4015 | // Construct a reasonable default comment if possible. |
| 4016 | if (!ccg.GetOutputs().empty()) { |
| 4017 | std::string comment; |
| 4018 | comment = "Generating "; |
| 4019 | char const* sep = ""; |
| 4020 | for (std::string const& o : ccg.GetOutputs()) { |
| 4021 | comment += sep; |
| 4022 | comment += this->MaybeRelativeToCurBinDir(o); |
| 4023 | sep = ", "; |
| 4024 | } |
| 4025 | return comment; |
| 4026 | } |
| 4027 | |
| 4028 | // Otherwise use the provided default. |
| 4029 | return default_comment; |
| 4030 | } |
| 4031 | |
| 4032 | class cmInstallTargetGeneratorLocal : public cmInstallTargetGenerator |
| 4033 | { |
no test coverage detected