Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
d9b2c7da
Commit
d9b2c7da
authored
Jul 02, 2019
by
Marc Chevrier
Browse files
Introduce memory management helper: cm_memory.hxx
parent
81389a5e
Changes
44
Hide whitespace changes
Inline
Side-by-side
Source/CPack/cmCPackExternalGenerator.cxx
View file @
d9b2c7da
...
...
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmCPackExternalGenerator.h"
#include
"cmAlgorithms.h"
#include
"cmCPackComponentGroup.h"
#include
"cmCPackLog.h"
#include
"cmMakefile.h"
...
...
@@ -17,6 +16,8 @@
#include
<utility>
#include
<vector>
#include
"cm_memory.hxx"
int
cmCPackExternalGenerator
::
InitializeInternal
()
{
this
->
SetOption
(
"CPACK_EXTERNAL_KNOWN_VERSIONS"
,
"1.0"
);
...
...
Source/CTest/cmCTestRunTest.cxx
View file @
d9b2c7da
...
...
@@ -11,7 +11,6 @@
#include
"cmsys/RegularExpression.hxx"
#include
<chrono>
#include
<cmAlgorithms.h>
#include
<cstdint>
#include
<cstring>
#include
<iomanip>
...
...
@@ -20,6 +19,8 @@
#include
<stdio.h>
#include
<utility>
#include
"cm_memory.hxx"
cmCTestRunTest
::
cmCTestRunTest
(
cmCTestMultiProcessHandler
&
multiHandler
)
:
MultiTestHandler
(
multiHandler
)
{
...
...
Source/CTest/cmCTestUpdateHandler.cxx
View file @
d9b2c7da
...
...
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmCTestUpdateHandler.h"
#include
"cmAlgorithms.h"
#include
"cmCLocaleEnvironmentScope.h"
#include
"cmCTest.h"
#include
"cmCTestBZR.h"
...
...
@@ -18,9 +17,10 @@
#include
"cmXMLWriter.h"
#include
<chrono>
#include
<memory>
#include
<sstream>
#include
"cm_memory.hxx"
static
const
char
*
cmCTestUpdateHandlerUpdateStrings
[]
=
{
"Unknown"
,
"CVS"
,
"SVN"
,
"BZR"
,
"GIT"
,
"HG"
,
"P4"
};
...
...
Source/cmAlgorithms.h
View file @
d9b2c7da
...
...
@@ -11,7 +11,6 @@
#include
<algorithm>
#include
<functional>
#include
<iterator>
#include
<memory>
#include
<sstream>
#include
<string.h>
#include
<string>
...
...
@@ -340,20 +339,6 @@ inline void cmStripSuffixIfExists(std::string& str, const std::string& suffix)
namespace
cm
{
#if defined(CMake_HAVE_CXX_MAKE_UNIQUE)
using
std
::
make_unique
;
#else
template
<
typename
T
,
typename
...
Args
>
std
::
unique_ptr
<
T
>
make_unique
(
Args
&&
...
args
)
{
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
}
#endif
#if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
using
std
::
size
;
...
...
Source/cmBinUtilsLinuxELFLinker.cxx
View file @
d9b2c7da
...
...
@@ -2,7 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmBinUtilsLinuxELFLinker.h"
#include
"cmAlgorithms.h"
#include
"cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h"
#include
"cmLDConfigLDConfigTool.h"
#include
"cmMakefile.h"
...
...
@@ -12,9 +12,10 @@
#include
<cmsys/RegularExpression.hxx>
#include
<memory>
#include
<sstream>
#include
"cm_memory.hxx"
static
std
::
string
ReplaceOrigin
(
const
std
::
string
&
rpath
,
const
std
::
string
&
origin
)
{
...
...
Source/cmBinUtilsMacOSMachOLinker.cxx
View file @
d9b2c7da
...
...
@@ -12,6 +12,8 @@
#include
<string>
#include
<vector>
#include
"cm_memory.hxx"
cmBinUtilsMacOSMachOLinker
::
cmBinUtilsMacOSMachOLinker
(
cmRuntimeDependencyArchive
*
archive
)
:
cmBinUtilsLinker
(
archive
)
...
...
Source/cmBinUtilsWindowsPELinker.cxx
View file @
d9b2c7da
...
...
@@ -2,16 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmBinUtilsWindowsPELinker.h"
#include
"cmAlgorithms.h"
#include
"cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h"
#include
"cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h"
#include
"cmRuntimeDependencyArchive.h"
#include
"cmSystemTools.h"
#include
<memory>
#include
<sstream>
#include
<vector>
#include
"cm_memory.hxx"
#ifdef _WIN32
# include <windows.h>
#endif
...
...
Source/cmCTest.cxx
View file @
d9b2c7da
...
...
@@ -15,7 +15,6 @@
#include
<ctype.h>
#include
<iostream>
#include
<map>
#include
<memory>
#include
<sstream>
#include
<stdio.h>
#include
<stdlib.h>
...
...
@@ -30,6 +29,8 @@
# include <unistd.h> // IWYU pragma: keep
#endif
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmCTestBuildAndTestHandler.h"
#include
"cmCTestBuildHandler.h"
...
...
Source/cmComputeLinkDepends.cxx
View file @
d9b2c7da
...
...
@@ -23,6 +23,8 @@
#include
<string.h>
#include
<utility>
#include
"cm_memory.hxx"
/*
This file computes an ordered list of link items to use when linking a
...
...
Source/cmCryptoHash.cxx
View file @
d9b2c7da
...
...
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmCryptoHash.h"
#include
"cmAlgorithms.h"
#include
"cm_kwiml.h"
#include
"cm_rhash.h"
#include
"cmsys/FStream.hxx"
#include
<string.h>
#include
<
memory
>
#include
"cm_
memory
.hxx"
static
unsigned
int
const
cmCryptoHashAlgoToId
[]
=
{
/* clang-format needs this comment to break after the opening brace */
...
...
Source/cmExportFileGenerator.cxx
View file @
d9b2c7da
...
...
@@ -20,11 +20,12 @@
#include
"cmsys/FStream.hxx"
#include
<assert.h>
#include
<memory>
#include
<sstream>
#include
<string.h>
#include
<utility>
#include
"cm_memory.hxx"
static
std
::
string
cmExportFileGeneratorEscape
(
std
::
string
const
&
str
)
{
// Escape a property value for writing into a .cmake file.
...
...
Source/cmExportLibraryDependenciesCommand.cxx
View file @
d9b2c7da
...
...
@@ -4,10 +4,10 @@
#include
"cmsys/FStream.hxx"
#include
<map>
#include
<memory>
#include
<utility>
#include
"cmAlgorithms.h"
#include
"cm_memory.hxx"
#include
"cmGeneratedFileStream.h"
#include
"cmGlobalGenerator.h"
#include
"cmMakefile.h"
...
...
Source/cmFileCommand.cxx
View file @
d9b2c7da
...
...
@@ -13,7 +13,6 @@
#include
<cmath>
#include
<ctype.h>
#include
<map>
#include
<memory>
#include
<set>
#include
<sstream>
#include
<stdio.h>
...
...
@@ -21,6 +20,8 @@
#include
<utility>
#include
<vector>
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmArgumentParser.h"
#include
"cmCryptoHash.h"
...
...
Source/cmFileTimes.cxx
View file @
d9b2c7da
...
...
@@ -2,11 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmFileTimes.h"
#include
"cmAlgorithms.h"
#include
"cm_sys_stat.h"
#include
<utility>
#include
"cm_memory.hxx"
#if defined(_WIN32)
# include "cmSystemTools.h"
# include <windows.h>
...
...
Source/cmFindPackageCommand.cxx
View file @
d9b2c7da
...
...
@@ -13,12 +13,13 @@
#include
<deque>
#include
<functional>
#include
<iterator>
#include
<memory>
#include
<sstream>
#include
<stdio.h>
#include
<string.h>
#include
<utility>
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmMakefile.h"
#include
"cmMessageType.h"
...
...
Source/cmForEachCommand.cxx
View file @
d9b2c7da
...
...
@@ -2,12 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include
"cmForEachCommand.h"
#include
<memory>
#include
<sstream>
#include
<stdio.h>
#include
<stdlib.h>
#include
"cmAlgorithms.h"
#include
"cm_memory.hxx"
#include
"cmExecutionStatus.h"
#include
"cmMakefile.h"
#include
"cmMessageType.h"
...
...
Source/cmGlobalNinjaGenerator.cxx
View file @
d9b2c7da
...
...
@@ -9,10 +9,11 @@
#include
<algorithm>
#include
<ctype.h>
#include
<iterator>
#include
<memory>
#include
<sstream>
#include
<stdio.h>
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmDocumentationEntry.h"
#include
"cmFortranParser.h"
...
...
Source/cmGlobalUnixMakefileGenerator3.cxx
View file @
d9b2c7da
...
...
@@ -4,10 +4,11 @@
#include
<algorithm>
#include
<functional>
#include
<memory>
#include
<sstream>
#include
<utility>
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmDocumentationEntry.h"
#include
"cmGeneratedFileStream.h"
...
...
Source/cmGlobalXCodeGenerator.cxx
View file @
d9b2c7da
...
...
@@ -5,11 +5,12 @@
#include
"cmsys/RegularExpression.hxx"
#include
<assert.h>
#include
<iomanip>
#include
<memory>
#include
<sstream>
#include
<stdio.h>
#include
<string.h>
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmComputeLinkInformation.h"
#include
"cmCustomCommand.h"
...
...
Source/cmListCommand.cxx
View file @
d9b2c7da
...
...
@@ -7,7 +7,6 @@
#include
<assert.h>
#include
<functional>
#include
<iterator>
#include
<memory>
#include
<set>
#include
<sstream>
#include
<stdexcept>
...
...
@@ -16,6 +15,8 @@
#include
<utility>
#include
<vector>
#include
"cm_memory.hxx"
#include
"cmAlgorithms.h"
#include
"cmGeneratorExpression.h"
#include
"cmMakefile.h"
...
...
Prev
1
2
3
Next
Brad King
@brad.king
mentioned in commit
a92b7fd4
·
Jul 15, 2019
mentioned in commit
a92b7fd4
mentioned in commit a92b7fd46bcf1ecd255290d84c691a244c8ecb26
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment