summaryrefslogtreecommitdiff
path: root/Source/cmCommandLineArgument.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-11-14 15:49:37 -0500
committerBrad King <brad.king@kitware.com>2022-11-15 07:47:07 -0500
commit8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df (patch)
tree2feeb011b4f19309ba6d9b53255862575e35daef /Source/cmCommandLineArgument.h
parentf8107e7c6bc007d6b00a2ba11dfd685a4606824a (diff)
downloadcmake-8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df.tar.gz
cmake -E copy: Add support for -t argument
Fixes: #23543
Diffstat (limited to 'Source/cmCommandLineArgument.h')
-rw-r--r--Source/cmCommandLineArgument.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmCommandLineArgument.h b/Source/cmCommandLineArgument.h
index 33c91bc5a3..003e972fc7 100644
--- a/Source/cmCommandLineArgument.h
+++ b/Source/cmCommandLineArgument.h
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#pragma once
+#include <cm/optional>
+
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -250,6 +252,15 @@ private:
return true;
};
}
+
+ static std::function<bool(const std::string&, CallState...)>
+ generateSetToValue(cm::optional<std::string>& value1)
+ {
+ return [&value1](const std::string& arg, CallState&&...) -> bool {
+ value1 = arg;
+ return true;
+ };
+ }
};
std::string extract_single_value(std::string const& input,