From 8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 14 Nov 2022 15:49:37 -0500 Subject: cmake -E copy: Add support for -t argument Fixes: #23543 --- Source/cmCommandLineArgument.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/cmCommandLineArgument.h') 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 + #include "cmStringAlgorithms.h" #include "cmSystemTools.h" @@ -250,6 +252,15 @@ private: return true; }; } + + static std::function + generateSetToValue(cm::optional& value1) + { + return [&value1](const std::string& arg, CallState&&...) -> bool { + value1 = arg; + return true; + }; + } }; std::string extract_single_value(std::string const& input, -- cgit v1.2.1