mirror of
https://github.com/reactos/CMake.git
synced 2025-02-08 04:48:46 +00:00
cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
This commit is contained in:
parent
9c31d83aa2
commit
c688b401d3
@ -368,11 +368,24 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
# Setup third-party libraries.
|
||||
# Everything in the tree should be able to include files from the
|
||||
# Utilities directory.
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "AIX" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# using -isystem option generate error "template with C linkage"
|
||||
include_directories("${CMake_SOURCE_DIR}/Utilities/std")
|
||||
else()
|
||||
include_directories(SYSTEM "${CMake_SOURCE_DIR}/Utilities/std")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMake_BINARY_DIR}/Utilities
|
||||
${CMake_SOURCE_DIR}/Utilities
|
||||
)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Build CMake std library for CMake and CTest.
|
||||
set(CMAKE_STD_LIBRARY cmstd)
|
||||
add_subdirectory(Utilities/std)
|
||||
CMAKE_SET_TARGET_FOLDER(cmstd "Utilities/std")
|
||||
|
||||
# check for the use of system libraries versus builtin ones
|
||||
# (a macro defined in this file)
|
||||
CMAKE_HANDLE_SYSTEM_LIBRARIES()
|
||||
|
@ -439,9 +439,6 @@ set(SRCS
|
||||
cmXMLWriter.h
|
||||
cmake.cxx
|
||||
cmake.h
|
||||
cm_string_view.cxx
|
||||
cm_string_view.hxx
|
||||
cm_static_string_view.hxx
|
||||
|
||||
cmCommand.cxx
|
||||
cmCommand.h
|
||||
@ -683,13 +680,13 @@ set(SRCS
|
||||
cmWriteFileCommand.cxx
|
||||
cmWriteFileCommand.h
|
||||
|
||||
cm_static_string_view.hxx
|
||||
cm_get_date.h
|
||||
cm_get_date.c
|
||||
cm_utf8.h
|
||||
cm_utf8.c
|
||||
cm_codecvt.hxx
|
||||
cm_codecvt.cxx
|
||||
cm_thread.hxx
|
||||
|
||||
cmDuration.h
|
||||
cmDuration.cxx
|
||||
@ -855,6 +852,7 @@ endforeach()
|
||||
# create a library used by the command line and the GUI
|
||||
add_library(CMakeLib ${SRCS})
|
||||
target_link_libraries(CMakeLib cmsys
|
||||
${CMAKE_STD_LIBRARY}
|
||||
${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES}
|
||||
${CMAKE_TAR_LIBRARIES}
|
||||
${CMAKE_CURL_LIBRARIES}
|
||||
|
@ -11,8 +11,9 @@
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmUuid.h"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cmWIXDirectoriesSourceWriter.h"
|
||||
#include "cmWIXFeaturesSourceWriter.h"
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmUuid.h"
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmCMakeToWixPath.h"
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger,
|
||||
std::string const& filename,
|
||||
GuidType componentGuidType)
|
||||
|
@ -10,9 +10,11 @@
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmsys/Glob.hxx"
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
#include <ostream>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
int cmCPackExternalGenerator::InitializeInternal()
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
#define cmCPackExternalGenerator_h
|
||||
|
||||
#include "cmCPackGenerator.h"
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include <memory>
|
||||
|
@ -10,9 +10,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmCPackComponentGroup.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
class cmCPackLog;
|
||||
class cmGlobalGenerator;
|
||||
|
@ -4,13 +4,14 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmCPackGenerator.h"
|
||||
#include "cmCPackLog.h"
|
||||
#include "cmDuration.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
cmCPackOSXX11Generator::cmCPackOSXX11Generator() = default;
|
||||
|
||||
|
@ -8,11 +8,12 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmArchiveWrite.h"
|
||||
#include "cmCPackGenerator.h"
|
||||
#include "cmCPackLog.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
cmCPackSTGZGenerator::cmCPackSTGZGenerator()
|
||||
: cmCPackArchiveGenerator(cmArchiveWrite::CompressGZip, "paxr", ".sh")
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmCTestBuildHandler;
|
||||
class cmCTestGenericHandler;
|
||||
|
@ -7,10 +7,12 @@
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmXMLWriter.h"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include "cmsys/FStream.hxx"
|
||||
#include "cmsys/RegularExpression.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <utility>
|
||||
|
||||
cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log)
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmCTestGenericHandler;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmCTestGenericHandler;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCTestTestCommand.h"
|
||||
#include "cmCommand.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
|
||||
: MultiTestHandler(multiHandler)
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "cmsys/Directory.hxx"
|
||||
#include "cmsys/Process.h"
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCTest.h"
|
||||
#include "cmCTestBuildCommand.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmCTestGenericHandler;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmCTestTestHandler.h"
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCTest.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmCTestGenericHandler;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
static const char* cmCTestUpdateHandlerUpdateStrings[] = {
|
||||
"Unknown", "CVS", "SVN", "BZR", "GIT", "HG", "P4"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
class cmCTestGenericHandler;
|
||||
|
||||
|
@ -238,81 +238,4 @@ typename Range::const_iterator cmFindNot(Range const& r, T const& t)
|
||||
return std::find_if(r.begin(), r.end(), [&t](T const& i) { return i != t; });
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
std::reverse_iterator<Iter> cmMakeReverseIterator(Iter it)
|
||||
{
|
||||
return std::reverse_iterator<Iter>(it);
|
||||
}
|
||||
|
||||
namespace cm {
|
||||
|
||||
#if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
|
||||
|
||||
using std::size;
|
||||
|
||||
#else
|
||||
|
||||
// std::size backport from C++17.
|
||||
template <class C>
|
||||
# if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
constexpr
|
||||
# endif
|
||||
auto
|
||||
size(C const& c) -> decltype(c.size())
|
||||
{
|
||||
return c.size();
|
||||
}
|
||||
|
||||
template <typename T, size_t N>
|
||||
# if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
constexpr
|
||||
# endif
|
||||
std::size_t
|
||||
size(const T (&)[N]) throw()
|
||||
{
|
||||
return N;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
int isize(const T& t)
|
||||
{
|
||||
return static_cast<int>(cm::size(t));
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201402L || defined(_MSVC_LANG) && _MSVC_LANG >= 201402L
|
||||
|
||||
using std::cbegin;
|
||||
using std::cend;
|
||||
|
||||
#else
|
||||
|
||||
// std::c{begin,end} backport from C++14
|
||||
template <class C>
|
||||
# if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
auto cbegin(C const& c)
|
||||
# else
|
||||
constexpr auto cbegin(C const& c) noexcept(noexcept(std::begin(c)))
|
||||
# endif
|
||||
-> decltype(std::begin(c))
|
||||
{
|
||||
return std::begin(c);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
# if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
auto cend(C const& c)
|
||||
# else
|
||||
constexpr auto cend(C const& c) noexcept(noexcept(std::end(c)))
|
||||
# endif
|
||||
-> decltype(std::end(c))
|
||||
{
|
||||
return std::end(c);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace cm
|
||||
|
||||
#endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cm_static_string_view.hxx"
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
static std::string ReplaceOrigin(const std::string& rpath,
|
||||
const std::string& origin)
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
cmBinUtilsMacOSMachOLinker::cmBinUtilsMacOSMachOLinker(
|
||||
cmRuntimeDependencyArchive* archive)
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
|
@ -29,7 +29,7 @@
|
||||
# include <unistd.h> // IWYU pragma: keep
|
||||
#endif
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCTestBuildAndTestHandler.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommands.h"
|
||||
#include "cmPolicies.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
/*
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "cm_rhash.h"
|
||||
#include "cmsys/FStream.hxx"
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
static unsigned int const cmCryptoHashAlgoToId[] = {
|
||||
/* clang-format needs this comment to break after the opening brace */
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_string_view.hxx" // IWYU pragma: keep
|
||||
#include <cm/string_view> // IWYU pragma: keep
|
||||
|
||||
/** Data structure to represent a single command line. */
|
||||
class cmCustomCommandLine : public std::vector<std::string>
|
||||
|
@ -2,7 +2,7 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmDefinitions.h"
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
@ -5,11 +5,12 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include "cmLinkedTree.h"
|
||||
|
||||
#include "cmString.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "cmDependsJavaLexer.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
#include "cmsys/FStream.hxx"
|
||||
#include <cm/string_view>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cm_kwiml.h"
|
||||
#include "cm_memory.hxx"
|
||||
#include "cmsys/FStream.hxx"
|
||||
#include <cm/memory>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
static std::string cmExportFileGeneratorEscape(std::string const& str)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmExecutionStatus.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
namespace cmFSPermissions {
|
||||
|
||||
// Table of permissions flags.
|
||||
|
@ -20,7 +20,9 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmArgumentParser.h"
|
||||
@ -44,7 +46,6 @@
|
||||
#include "cmSubcommandTable.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmTimestamp.h"
|
||||
#include "cm_sys_stat.h"
|
||||
#include "cmake.h"
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
|
@ -6,9 +6,10 @@
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cmFileTimeCache.h"
|
||||
#include "cm_sys_stat.h"
|
||||
#include "cmsys/RegularExpression.hxx"
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmFileTimes.h"
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include "cmSystemTools.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmMakefile.h"
|
||||
|
@ -6,9 +6,10 @@
|
||||
#include <cstdlib>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cm_static_string_view.hxx"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include "cmExecutionStatus.h"
|
||||
#include "cmFunctionBlocker.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cmListFileCache.h"
|
||||
|
||||
|
@ -5,9 +5,10 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cm_static_string_view.hxx"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmExecutionStatus.h"
|
||||
|
@ -10,9 +10,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
#include "cmGeneratorExpression.h"
|
||||
#include "cmPolicies.h"
|
||||
#include "cm_sys_stat.h"
|
||||
|
||||
class cmLocalGenerator;
|
||||
|
||||
|
@ -29,12 +29,13 @@
|
||||
#include "cmsys/RegularExpression.hxx"
|
||||
#include "cmsys/String.h"
|
||||
|
||||
#include <cm/iterator>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmComputeLinkInformation.h"
|
||||
#include "cmCustomCommand.h"
|
||||
@ -42,7 +44,6 @@
|
||||
#include "cmTarget.h"
|
||||
#include "cmTargetLinkLibraryType.h"
|
||||
#include "cmTargetPropertyComputer.h"
|
||||
#include "cm_string_view.hxx"
|
||||
#include "cmake.h"
|
||||
|
||||
class cmMessenger;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmDocumentationEntry.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmDocumentationEntry.h"
|
||||
|
@ -11,10 +11,11 @@
|
||||
#include "cmState.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmUuid.h"
|
||||
#include "cm_string_view.hxx"
|
||||
#include "cmake.h"
|
||||
#include "cmsys/Encoding.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <assert.h>
|
||||
#include <vector>
|
||||
#include <windows.h>
|
||||
|
@ -10,7 +10,8 @@
|
||||
#include <shellapi.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include <cm/iterator>
|
||||
|
||||
#include "cmCallVisualStudioMacro.h"
|
||||
#include "cmCustomCommand.h"
|
||||
#include "cmCustomCommandLines.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmComputeLinkInformation.h"
|
||||
|
@ -2,9 +2,10 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmIfCommand.h"
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cm_static_string_view.hxx"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include "cmConditionEvaluator.h"
|
||||
#include "cmExecutionStatus.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -16,7 +16,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cm_static_string_view.hxx"
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCPluginAPI.cxx"
|
||||
#include "cmCPluginAPI.h"
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "cmTarget.h"
|
||||
#include "cmTestGenerator.h"
|
||||
#include "cmVersion.h"
|
||||
#include "cm_string_view.hxx"
|
||||
#include "cmake.h"
|
||||
#include "cmsys/RegularExpression.hxx"
|
||||
|
||||
@ -39,6 +38,8 @@
|
||||
# include "cmCryptoHash.h"
|
||||
#endif
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCustomCommand.h" // IWYU pragma: keep
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
// Include the Mach-O format information system header.
|
||||
#include <mach-o/fat.h>
|
||||
|
@ -5,9 +5,10 @@
|
||||
#include <cstdio>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cm_static_string_view.hxx"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmExecutionStatus.h"
|
||||
|
@ -10,12 +10,11 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/iterator>
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCommandArgumentParserHelper.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmListFileCache.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmGeneratorTarget.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCustomCommand.h" // IWYU pragma: keep
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmComputeLinkInformation.h"
|
||||
|
@ -6,7 +6,8 @@
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cmStateSnapshot.h"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "cmRange.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
static std::string EscapeArg(const std::string& arg)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cm_string_view.hxx"
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmTarget.h"
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmQtAutoGen.h"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -2,7 +2,8 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmQtAutoGenerator.h"
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmsys/FStream.hxx"
|
||||
|
||||
#include "cmGlobalGenerator.h"
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
#include "cmFileTime.h"
|
||||
#include "cmQtAutoGen.h"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
@ -2,6 +2,12 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmQtAutoMocUic.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCryptoHash.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
@ -9,13 +15,9 @@
|
||||
#include "cmQtAutoGen.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_memory.hxx"
|
||||
#include "cmake.h"
|
||||
#include "cmsys/FStream.hxx"
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#if defined(__APPLE__)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
@ -9,9 +9,10 @@
|
||||
#include "cmQtAutoGen.h"
|
||||
#include "cmQtAutoGenerator.h"
|
||||
#include "cmWorkerPool.h"
|
||||
#include "cm_string_view.hxx"
|
||||
#include "cmsys/RegularExpression.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
|
@ -11,7 +11,8 @@
|
||||
#include "cmQtAutoGen.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cm_string_view.hxx"
|
||||
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#if defined(_WIN32)
|
||||
static void AddVisualStudioPath(std::vector<std::string>& paths,
|
||||
|
@ -20,7 +20,8 @@
|
||||
#include <mutex>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
#include <cm/shared_mutex>
|
||||
|
||||
void on_signal(uv_signal_t* signal, int signum)
|
||||
{
|
||||
|
@ -5,11 +5,12 @@
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cm_jsoncpp_value.h"
|
||||
#include "cm_thread.hxx"
|
||||
#include "cm_uv.h"
|
||||
|
||||
#include "cmUVHandlePtr.h"
|
||||
|
||||
#include <cm/shared_mutex>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
// Get rid of some windows macros:
|
||||
#undef max
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <cstring>
|
||||
#include <utility>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
#include <cm/memory>
|
||||
|
||||
#include "cmCacheManager.h"
|
||||
#include "cmCommand.h"
|
||||
|
@ -5,9 +5,10 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
|
||||
#include <cm/iterator>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmProperty.h"
|
||||
#include "cmPropertyMap.h"
|
||||
@ -177,7 +178,7 @@ cmStringRange GetPropertyContent(T const& content, U contentEndPosition)
|
||||
{
|
||||
auto end = content.begin() + contentEndPosition;
|
||||
|
||||
auto rbegin = cmMakeReverseIterator(end);
|
||||
auto rbegin = cm::make_reverse_iterator(end);
|
||||
rbegin = std::find(rbegin, content.rend(), cmPropertySentinal);
|
||||
|
||||
return cmMakeRange(rbegin.base(), end);
|
||||
@ -189,7 +190,7 @@ cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces,
|
||||
{
|
||||
auto entryEnd = content.begin() + contentEndPosition;
|
||||
|
||||
auto rbegin = cmMakeReverseIterator(entryEnd);
|
||||
auto rbegin = cm::make_reverse_iterator(entryEnd);
|
||||
rbegin = std::find(rbegin, content.rend(), cmPropertySentinal);
|
||||
|
||||
auto it = backtraces.begin() + std::distance(content.begin(), rbegin.base());
|
||||
@ -270,7 +271,7 @@ void cmStateDirectory::PrependIncludeDirectoriesEntry(
|
||||
this->Snapshot_.Position->IncludeDirectoryPosition;
|
||||
|
||||
auto rend = this->DirectoryState->IncludeDirectories.rend();
|
||||
auto rbegin = cmMakeReverseIterator(entryEnd);
|
||||
auto rbegin = cm::make_reverse_iterator(entryEnd);
|
||||
rbegin = std::find(rbegin, rend, cmPropertySentinal);
|
||||
|
||||
auto entryIt = rbegin.base();
|
||||
@ -440,7 +441,7 @@ void cmStateDirectory::PrependLinkDirectoriesEntry(
|
||||
this->Snapshot_.Position->LinkDirectoriesPosition;
|
||||
|
||||
auto rend = this->DirectoryState->LinkDirectories.rend();
|
||||
auto rbegin = cmMakeReverseIterator(entryEnd);
|
||||
auto rbegin = cm::make_reverse_iterator(entryEnd);
|
||||
rbegin = std::find(rbegin, rend, cmPropertySentinal);
|
||||
|
||||
auto entryIt = rbegin.base();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user