summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-01 12:26:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-01 12:27:37 (GMT)
commit68a59ab2887f220a22c194b930c28d5498a7fd8d (patch)
treee68f59c90929e65b70e75c43d45ff2b87c777d9a /Source
parentd1d1d4134dc2f6b84aba7b3cfe3bc83364859603 (diff)
parent8d4a9ee398ef85b4f59a8e2b966d9675d7e53f44 (diff)
downloadCMake-68a59ab2887f220a22c194b930c28d5498a7fd8d.zip
CMake-68a59ab2887f220a22c194b930c28d5498a7fd8d.tar.gz
CMake-68a59ab2887f220a22c194b930c28d5498a7fd8d.tar.bz2
Merge topic 'stl-support'
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4689
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx2
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx2
-rw-r--r--Source/CTest/cmCTestCoverageCommand.cxx3
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx2
-rw-r--r--Source/CTest/cmCTestMemCheckCommand.cxx2
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx3
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/CTest/cmCTestUploadCommand.cxx3
-rw-r--r--Source/cmArgumentParser.h3
-rw-r--r--Source/cmCTest.cxx3
-rw-r--r--Source/cmConfigureFileCommand.cxx3
-rw-r--r--Source/cmCoreTryCompile.cxx4
-rw-r--r--Source/cmExecuteProcessCommand.cxx3
-rw-r--r--Source/cmExportCommand.cxx3
-rw-r--r--Source/cmFileCommand.cxx2
-rw-r--r--Source/cmForEachCommand.cxx3
-rw-r--r--Source/cmFunctionCommand.cxx3
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx3
-rw-r--r--Source/cmGeneratorExpressionNode.cxx3
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmIfCommand.cxx3
-rw-r--r--Source/cmInstallCommand.cxx3
-rw-r--r--Source/cmInstallCommandArguments.cxx2
-rw-r--r--Source/cmListCommand.cxx3
-rw-r--r--Source/cmMacroCommand.cxx3
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmMessageCommand.cxx3
-rw-r--r--Source/cmString.hxx3
-rw-r--r--Source/cmStringCommand.cxx3
-rw-r--r--Source/cmSubcommandTable.h3
-rw-r--r--Source/cmWhileCommand.cxx3
-rw-r--r--Source/cm_static_string_view.hxx41
-rw-r--r--Source/cmake.cxx2
35 files changed, 34 insertions, 98 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 564e647..ec473d2 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -698,7 +698,6 @@ set(SRCS
cmWriteFileCommand.cxx
cmWriteFileCommand.h
- cm_static_string_view.hxx
cm_get_date.h
cm_get_date.c
cm_utf8.h
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index d1b7701..44fdc29 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -5,7 +5,7 @@
#include <cstring>
#include <sstream>
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestBuildHandler.h"
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 3854710..f42c3f1 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -6,7 +6,7 @@
#include <sstream>
#include <vector>
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestConfigureHandler.h"
diff --git a/Source/CTest/cmCTestCoverageCommand.cxx b/Source/CTest/cmCTestCoverageCommand.cxx
index e335923..7432d08 100644
--- a/Source/CTest/cmCTestCoverageCommand.cxx
+++ b/Source/CTest/cmCTestCoverageCommand.cxx
@@ -5,8 +5,7 @@
#include <set>
#include <cmext/algorithm>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index b1034c9..a755632 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -7,7 +7,7 @@
#include <cstring>
#include <sstream>
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestGenericHandler.h"
diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx
index 39dec6d..d0e2974 100644
--- a/Source/CTest/cmCTestMemCheckCommand.cxx
+++ b/Source/CTest/cmCTestMemCheckCommand.cxx
@@ -2,7 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestMemCheckCommand.h"
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestMemCheckHandler.h"
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index 5b2f2e6..279216e 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -9,8 +9,7 @@
#include <cm/memory>
#include <cm/vector>
#include <cmext/algorithm>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestSubmitHandler.h"
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index 6b317cb..c71b409 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -6,7 +6,7 @@
#include <cstdlib>
#include <sstream>
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestGenericHandler.h"
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index e6b3f36..8fc5cd6 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -20,13 +20,13 @@
#include <cm/memory>
#include <cm/string_view>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/FStream.hxx"
#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/RegularExpression.hxx>
-#include "cm_static_string_view.hxx"
#include "cm_utf8.h"
#include "cmCTest.h"
diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx
index eaef1ca..f86ee0d 100644
--- a/Source/CTest/cmCTestUploadCommand.cxx
+++ b/Source/CTest/cmCTestUploadCommand.cxx
@@ -6,8 +6,7 @@
#include <sstream>
#include <cm/vector>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestUploadHandler.h"
diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h
index 9426537..5d2dfa2 100644
--- a/Source/cmArgumentParser.h
+++ b/Source/cmArgumentParser.h
@@ -12,8 +12,7 @@
#include <vector>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
namespace ArgumentParser {
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index c2b2a09..2a0ddba1 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -19,6 +19,7 @@
#include <cm/memory>
#include <cm/string_view>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/Base64.h"
#include "cmsys/Directory.hxx"
@@ -36,8 +37,6 @@
# include <unistd.h> // IWYU pragma: keep
#endif
-#include "cm_static_string_view.hxx"
-
#include "cmCTestBuildAndTestHandler.h"
#include "cmCTestBuildHandler.h"
#include "cmCTestConfigureHandler.h"
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index bac9337..5b3045d 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -5,8 +5,7 @@
#include <set>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index dc2df14..4e2caed 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -8,9 +8,9 @@
#include <sstream>
#include <utility>
-#include "cmsys/Directory.hxx"
+#include <cmext/string_view>
-#include "cm_static_string_view.hxx"
+#include "cmsys/Directory.hxx"
#include "cmExportTryCompileFileGenerator.h"
#include "cmGlobalGenerator.h"
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 08a0f7e..9c53bdf 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -10,11 +10,10 @@
#include <vector>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/Process.h"
-#include "cm_static_string_view.hxx"
-
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index ad632ee..9f8a821 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -8,11 +8,10 @@
#include <cm/memory>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/RegularExpression.hxx"
-#include "cm_static_string_view.hxx"
-
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
#include "cmExportBuildAndroidMKGenerator.h"
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4ec128e..161bbe8 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -17,13 +17,13 @@
#include <cm/memory>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/FStream.hxx"
#include "cmsys/Glob.hxx"
#include "cmsys/RegularExpression.hxx"
#include "cm_kwiml.h"
-#include "cm_static_string_view.hxx"
#include "cm_sys_stat.h"
#include "cmAlgorithms.h"
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 82c5223..32e7892 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -18,8 +18,7 @@
#include <cm/memory>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmExecutionStatus.h"
#include "cmFunctionBlocker.h"
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index a4c9072..b6f58bd 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -7,8 +7,7 @@
#include <cm/memory>
#include <cm/string_view>
#include <cmext/algorithm>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmExecutionStatus.h"
#include "cmFunctionBlocker.h"
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index b4ba1a1..4f379cd 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -7,8 +7,7 @@
#include <utility>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmGeneratorExpressionContext.h"
#include "cmGeneratorExpressionEvaluator.h"
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 68f466f..e3de2d8 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -17,12 +17,11 @@
#include <cm/string_view>
#include <cm/vector>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/RegularExpression.hxx"
#include "cmsys/String.h"
-#include "cm_static_string_view.hxx"
-
#include "cmAlgorithms.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionContext.h"
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 509df93..ac08cf7 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -18,11 +18,10 @@
#include <cm/memory>
#include <cm/string_view>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/RegularExpression.hxx"
-#include "cm_static_string_view.hxx"
-
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 290e064..5808f90 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -7,8 +7,7 @@
#include <cm/memory>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmConditionEvaluator.h"
#include "cmExecutionStatus.h"
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index c9b22b6..ac57bc2 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -8,11 +8,10 @@
#include <utility>
#include <cm/memory>
+#include <cmext/string_view>
#include "cmsys/Glob.hxx"
-#include "cm_static_string_view.hxx"
-
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
#include "cmExportSet.h"
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx
index 31ba63f..a034689 100644
--- a/Source/cmInstallCommandArguments.cxx
+++ b/Source/cmInstallCommandArguments.cxx
@@ -4,7 +4,7 @@
#include <utility>
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmRange.h"
#include "cmSystemTools.h"
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 1d82dfc..edec613 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -17,11 +17,10 @@
#include <cm/memory>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/RegularExpression.hxx"
-#include "cm_static_string_view.hxx"
-
#include "cmAlgorithms.h"
#include "cmExecutionStatus.h"
#include "cmGeneratorExpression.h"
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index 0b0d9ac..c88b343 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -8,8 +8,7 @@
#include <cm/memory>
#include <cm/string_view>
#include <cmext/algorithm>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmExecutionStatus.h"
#include "cmFunctionBlocker.h"
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 028b0f5..979b9d8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -18,13 +18,13 @@
#include <cm/optional>
#include <cm/vector>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/FStream.hxx"
#include "cmsys/RegularExpression.hxx"
#include "cm_jsoncpp_value.h"
#include "cm_jsoncpp_writer.h"
-#include "cm_static_string_view.hxx"
#include "cm_sys_stat.h"
#include "cmCommandArgumentParserHelper.h"
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index bf8183b..c7bb9a7 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -6,8 +6,7 @@
#include <utility>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
diff --git a/Source/cmString.hxx b/Source/cmString.hxx
index 9e91986..87bfdff 100644
--- a/Source/cmString.hxx
+++ b/Source/cmString.hxx
@@ -16,8 +16,7 @@
#include <utility>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
namespace cm {
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 7662204..a7c21cc 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -11,11 +11,10 @@
#include <memory>
#include <cm/iterator>
+#include <cmext/string_view>
#include "cmsys/RegularExpression.hxx"
-#include "cm_static_string_view.hxx"
-
#include "cmCryptoHash.h"
#include "cmExecutionStatus.h"
#include "cmGeneratorExpression.h"
diff --git a/Source/cmSubcommandTable.h b/Source/cmSubcommandTable.h
index 65eb8c7..7deaaed 100644
--- a/Source/cmSubcommandTable.h
+++ b/Source/cmSubcommandTable.h
@@ -11,8 +11,7 @@
#include <vector>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
class cmExecutionStatus;
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index 26e7c75..0d8e894 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -7,8 +7,7 @@
#include <cm/memory>
#include <cm/string_view>
-
-#include "cm_static_string_view.hxx"
+#include <cmext/string_view>
#include "cmConditionEvaluator.h"
#include "cmExecutionStatus.h"
diff --git a/Source/cm_static_string_view.hxx b/Source/cm_static_string_view.hxx
deleted file mode 100644
index 708ac95..0000000
--- a/Source/cm_static_string_view.hxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing for details. */
-#ifndef cm_static_string_view_hxx
-#define cm_static_string_view_hxx
-
-#include "cmConfigure.h" // IWYU pragma: keep
-
-#include <cstddef>
-
-#include <cm/string_view>
-
-namespace cm {
-
-/** A string_view that only binds to static storage.
- *
- * This is used together with the `""_s` user-defined literal operator
- * to construct a type-safe abstraction of a string_view that only views
- * statically allocated strings. These strings are const and available
- * for the entire lifetime of the program.
- */
-class static_string_view : public string_view
-{
- static_string_view(string_view v)
- : string_view(v)
- {
- }
-
- friend static_string_view operator"" _s(const char* data, size_t size);
-};
-
-/** Create a static_string_view using `""_s` literal syntax. */
-inline static_string_view operator"" _s(const char* data, size_t size)
-{
- return string_view(data, size);
-}
-
-} // namespace cm
-
-using cm::operator"" _s;
-
-#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c619e1e..c8a1e76 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -19,12 +19,12 @@
#endif
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/FStream.hxx"
#include "cmsys/Glob.hxx"
#include "cmsys/RegularExpression.hxx"
-#include "cm_static_string_view.hxx"
#include "cm_sys_stat.h"
#include "cmCommands.h"