diff options
author | Brad King <brad.king@kitware.com> | 2022-11-22 14:47:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-22 14:47:59 (GMT) |
commit | 62172b4ab7dd06375b95f1ee9d467c015acd6c01 (patch) | |
tree | 3a6e8bf8cecd107f3954c886ef30bd4376238712 /Source/cmGlobalXCodeGenerator.cxx | |
parent | a449a840bdbb321433c3e5049323628816e8032f (diff) | |
parent | 26d813092bffdcda77976ab5ba59c114e3e2fda5 (diff) | |
download | CMake-62172b4ab7dd06375b95f1ee9d467c015acd6c01.zip CMake-62172b4ab7dd06375b95f1ee9d467c015acd6c01.tar.gz CMake-62172b4ab7dd06375b95f1ee9d467c015acd6c01.tar.bz2 |
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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aeb5074..e928551 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -13,6 +13,7 @@ #include <utility> #include <cm/memory> +#include <cm/optional> #include <cmext/algorithm> #include <cmext/string_view> @@ -2280,11 +2281,11 @@ void cmGlobalXCodeGenerator::CreateCustomRulesMakefile( } makefileStream << "\n"; - if (const char* comment = ccg.GetComment()) { + if (cm::optional<std::string> comment = ccg.GetComment()) { std::string echo_cmd = cmStrCat("echo ", (this->CurrentLocalGenerator->EscapeForShell( - comment, ccg.GetCC().GetEscapeAllowMakeVars()))); + *comment, ccg.GetCC().GetEscapeAllowMakeVars()))); makefileStream << "\t" << echo_cmd << "\n"; } |