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

Method ConstructComment

Source/cmLocalGenerator.cxx:4007–4030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4005}
4006
4007std::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
4032class cmInstallTargetGeneratorLocal : public cmInstallTargetGenerator
4033{

Callers 6

WriteCustomRuleMethod · 0.80
WriteCustomRuleMethod · 0.80
WriteEventMethod · 0.80
WriteSdkStyleEventMethod · 0.80

Calls 3

GetCommentMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected