diff options
author | Brad King <brad.king@kitware.com> | 2022-11-22 14:47:50 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-22 09:47:59 -0500 |
commit | 62172b4ab7dd06375b95f1ee9d467c015acd6c01 (patch) | |
tree | 3a6e8bf8cecd107f3954c886ef30bd4376238712 /Source/cmLocalGenerator.cxx | |
parent | a449a840bdbb321433c3e5049323628816e8032f (diff) | |
parent | 26d813092bffdcda77976ab5ba59c114e3e2fda5 (diff) | |
download | cmake-62172b4ab7dd06375b95f1ee9d467c015acd6c01.tar.gz |
Merge topic 'custom-command-comment-genex'
26d813092b add_custom_{command,target}: add genex support for COMMENT
60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7887
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4d5371fc4d..5bf9d3294a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -3474,8 +3474,8 @@ std::string cmLocalGenerator::ConstructComment( cmCustomCommandGenerator const& ccg, const char* default_comment) const { // Check for a comment provided with the command. - if (ccg.GetComment()) { - return ccg.GetComment(); + if (cm::optional<std::string> comment = ccg.GetComment()) { + return *comment; } // Construct a reasonable default comment if possible. |