Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
5962db43
Commit
5962db43
authored
Aug 22, 2017
by
Daniel Pfeifer
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use C++11 nullptr
parent
fe19fda2
Changes
235
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
327 additions
and
355 deletions
+327
-355
.clang-tidy
.clang-tidy
+0
-3
Source/CPack/IFW/cmCPackIFWCommon.cxx
Source/CPack/IFW/cmCPackIFWCommon.cxx
+2
-2
Source/CPack/IFW/cmCPackIFWGenerator.cxx
Source/CPack/IFW/cmCPackIFWGenerator.cxx
+5
-5
Source/CPack/IFW/cmCPackIFWPackage.cxx
Source/CPack/IFW/cmCPackIFWPackage.cxx
+1
-1
Source/CPack/WiX/cmWIXPatchParser.cxx
Source/CPack/WiX/cmWIXPatchParser.cxx
+1
-1
Source/CPack/cmCPackArchiveGenerator.cxx
Source/CPack/cmCPackArchiveGenerator.cxx
+3
-3
Source/CPack/cmCPackComponentGroup.h
Source/CPack/cmCPackComponentGroup.h
+2
-2
Source/CPack/cmCPackDebGenerator.cxx
Source/CPack/cmCPackDebGenerator.cxx
+5
-5
Source/CPack/cmCPackGenerator.cxx
Source/CPack/cmCPackGenerator.cxx
+11
-12
Source/CPack/cmCPackGenerator.h
Source/CPack/cmCPackGenerator.h
+1
-1
Source/CPack/cmCPackGeneratorFactory.cxx
Source/CPack/cmCPackGeneratorFactory.cxx
+2
-2
Source/CPack/cmCPackLog.cxx
Source/CPack/cmCPackLog.cxx
+4
-4
Source/CPack/cmCPackNSISGenerator.cxx
Source/CPack/cmCPackNSISGenerator.cxx
+4
-4
Source/CPack/cmCPackRPMGenerator.cxx
Source/CPack/cmCPackRPMGenerator.cxx
+4
-4
Source/CPack/cpack.cxx
Source/CPack/cpack.cxx
+6
-6
Source/CTest/cmCTestBZR.cxx
Source/CTest/cmCTestBZR.cxx
+6
-7
Source/CTest/cmCTestBuildAndTestHandler.cxx
Source/CTest/cmCTestBuildAndTestHandler.cxx
+9
-9
Source/CTest/cmCTestBuildCommand.cxx
Source/CTest/cmCTestBuildCommand.cxx
+8
-8
Source/CTest/cmCTestBuildHandler.cxx
Source/CTest/cmCTestBuildHandler.cxx
+11
-11
Source/CTest/cmCTestCVS.cxx
Source/CTest/cmCTestCVS.cxx
+4
-3
Source/CTest/cmCTestCommand.h
Source/CTest/cmCTestCommand.h
+2
-2
Source/CTest/cmCTestConfigureCommand.cxx
Source/CTest/cmCTestConfigureCommand.cxx
+8
-9
Source/CTest/cmCTestCoverageCommand.cxx
Source/CTest/cmCTestCoverageCommand.cxx
+1
-1
Source/CTest/cmCTestCoverageHandler.cxx
Source/CTest/cmCTestCoverageHandler.cxx
+5
-5
Source/CTest/cmCTestCurl.cxx
Source/CTest/cmCTestCurl.cxx
+2
-2
Source/CTest/cmCTestGIT.cxx
Source/CTest/cmCTestGIT.cxx
+22
-26
Source/CTest/cmCTestGenericHandler.cxx
Source/CTest/cmCTestGenericHandler.cxx
+2
-2
Source/CTest/cmCTestHG.cxx
Source/CTest/cmCTestHG.cxx
+5
-5
Source/CTest/cmCTestHandlerCommand.cxx
Source/CTest/cmCTestHandlerCommand.cxx
+2
-2
Source/CTest/cmCTestLaunch.cxx
Source/CTest/cmCTestLaunch.cxx
+6
-6
Source/CTest/cmCTestMemCheckCommand.cxx
Source/CTest/cmCTestMemCheckCommand.cxx
+1
-1
Source/CTest/cmCTestMemCheckHandler.cxx
Source/CTest/cmCTestMemCheckHandler.cxx
+9
-9
Source/CTest/cmCTestP4.cxx
Source/CTest/cmCTestP4.cxx
+7
-7
Source/CTest/cmCTestRunTest.cxx
Source/CTest/cmCTestRunTest.cxx
+3
-3
Source/CTest/cmCTestSVN.cxx
Source/CTest/cmCTestSVN.cxx
+1
-1
Source/CTest/cmCTestScriptHandler.cxx
Source/CTest/cmCTestScriptHandler.cxx
+8
-8
Source/CTest/cmCTestStartCommand.cxx
Source/CTest/cmCTestStartCommand.cxx
+3
-3
Source/CTest/cmCTestSubmitCommand.cxx
Source/CTest/cmCTestSubmitCommand.cxx
+2
-2
Source/CTest/cmCTestSubmitHandler.cxx
Source/CTest/cmCTestSubmitHandler.cxx
+9
-9
Source/CTest/cmCTestSubmitHandler.h
Source/CTest/cmCTestSubmitHandler.h
+1
-1
Source/CTest/cmCTestTestCommand.cxx
Source/CTest/cmCTestTestCommand.cxx
+1
-1
Source/CTest/cmCTestTestHandler.cxx
Source/CTest/cmCTestTestHandler.cxx
+8
-8
Source/CTest/cmCTestUpdateCommand.cxx
Source/CTest/cmCTestUpdateCommand.cxx
+2
-2
Source/CTest/cmCTestUpdateHandler.cxx
Source/CTest/cmCTestUpdateHandler.cxx
+1
-1
Source/CTest/cmCTestUploadCommand.cxx
Source/CTest/cmCTestUploadCommand.cxx
+1
-1
Source/CTest/cmCTestVC.cxx
Source/CTest/cmCTestVC.cxx
+2
-2
Source/CTest/cmCTestVC.h
Source/CTest/cmCTestVC.h
+4
-4
Source/CTest/cmParseMumpsCoverage.cxx
Source/CTest/cmParseMumpsCoverage.cxx
+2
-2
Source/CTest/cmProcess.cxx
Source/CTest/cmProcess.cxx
+2
-2
Source/Checks/cm_cxx_features.cmake
Source/Checks/cm_cxx_features.cmake
+0
-1
Source/Checks/cm_cxx_nullptr.cxx
Source/Checks/cm_cxx_nullptr.cxx
+0
-14
Source/CursesDialog/ccmake.cxx
Source/CursesDialog/ccmake.cxx
+13
-14
Source/CursesDialog/cmCursesCacheEntryComposite.cxx
Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+3
-3
Source/CursesDialog/cmCursesForm.cxx
Source/CursesDialog/cmCursesForm.cxx
+2
-2
Source/CursesDialog/cmCursesLongMessageForm.cxx
Source/CursesDialog/cmCursesLongMessageForm.cxx
+4
-4
Source/CursesDialog/cmCursesMainForm.cxx
Source/CursesDialog/cmCursesMainForm.cxx
+18
-18
Source/CursesDialog/cmCursesMainForm.h
Source/CursesDialog/cmCursesMainForm.h
+1
-1
Source/CursesDialog/cmCursesStringWidget.cxx
Source/CursesDialog/cmCursesStringWidget.cxx
+1
-1
Source/CursesDialog/cmCursesWidget.cxx
Source/CursesDialog/cmCursesWidget.cxx
+1
-1
Source/QtDialog/CMakeSetup.cxx
Source/QtDialog/CMakeSetup.cxx
+7
-8
Source/QtDialog/CMakeSetupDialog.cxx
Source/QtDialog/CMakeSetupDialog.cxx
+2
-2
Source/QtDialog/Compilers.h
Source/QtDialog/Compilers.h
+1
-1
Source/QtDialog/QCMake.h
Source/QtDialog/QCMake.h
+1
-1
Source/QtDialog/QCMakeCacheView.cxx
Source/QtDialog/QCMakeCacheView.cxx
+2
-2
Source/QtDialog/QCMakeWidgets.cxx
Source/QtDialog/QCMakeWidgets.cxx
+3
-3
Source/QtDialog/QCMakeWidgets.h
Source/QtDialog/QCMakeWidgets.h
+2
-3
Source/cmAddCustomCommandCommand.cxx
Source/cmAddCustomCommandCommand.cxx
+1
-1
Source/cmAddCustomTargetCommand.cxx
Source/cmAddCustomTargetCommand.cxx
+1
-1
Source/cmArchiveWrite.cxx
Source/cmArchiveWrite.cxx
+3
-3
Source/cmArchiveWrite.h
Source/cmArchiveWrite.h
+2
-2
Source/cmCPluginAPI.cxx
Source/cmCPluginAPI.cxx
+11
-11
Source/cmCTest.cxx
Source/cmCTest.cxx
+25
-25
Source/cmCTest.h
Source/cmCTest.h
+4
-4
Source/cmCacheManager.cxx
Source/cmCacheManager.cxx
+5
-5
Source/cmCacheManager.h
Source/cmCacheManager.h
+3
-4
No files found.
.clang-tidy
View file @
5962db43
...
...
@@ -24,7 +24,4 @@ readability-*,\
-readability-simplify-boolean-expr,\
"
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
CheckOptions:
- key: modernize-use-nullptr.NullMacros
value: 'CM_NULLPTR'
...
Source/CPack/IFW/cmCPackIFWCommon.cxx
View file @
5962db43
...
...
@@ -15,14 +15,14 @@
#include <vector>
cmCPackIFWCommon
::
cmCPackIFWCommon
()
:
Generator
(
CM_NULLPTR
)
:
Generator
(
nullptr
)
{
}
const
char
*
cmCPackIFWCommon
::
GetOption
(
const
std
::
string
&
op
)
const
{
return
this
->
Generator
?
this
->
Generator
->
cmCPackGenerator
::
GetOption
(
op
)
:
CM_NULLPTR
;
:
nullptr
;
}
bool
cmCPackIFWCommon
::
IsOn
(
const
std
::
string
&
op
)
const
...
...
Source/CPack/IFW/cmCPackIFWGenerator.cxx
View file @
5962db43
...
...
@@ -73,7 +73,7 @@ int cmCPackIFWGenerator::PackageFiles()
int
retVal
=
1
;
cmCPackIFWLogger
(
OUTPUT
,
"- Generate repository"
<<
std
::
endl
);
bool
res
=
cmSystemTools
::
RunSingleCommand
(
ifwCmd
.
c_str
(),
&
output
,
&
output
,
&
retVal
,
CM_NULLPTR
,
&
output
,
&
retVal
,
nullptr
,
this
->
GeneratorVerbose
,
0
);
if
(
!
res
||
retVal
)
{
cmGeneratedFileStream
ofs
(
ifwTmpFile
.
c_str
());
...
...
@@ -171,7 +171,7 @@ int cmCPackIFWGenerator::PackageFiles()
int
retVal
=
1
;
cmCPackIFWLogger
(
OUTPUT
,
"- Generate package"
<<
std
::
endl
);
bool
res
=
cmSystemTools
::
RunSingleCommand
(
ifwCmd
.
c_str
(),
&
output
,
&
output
,
&
retVal
,
CM_NULLPTR
,
&
output
,
&
retVal
,
nullptr
,
this
->
GeneratorVerbose
,
0
);
if
(
!
res
||
retVal
)
{
cmGeneratedFileStream
ofs
(
ifwTmpFile
.
c_str
());
...
...
@@ -534,7 +534,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetGroupPackage(
{
std
::
map
<
cmCPackComponentGroup
*
,
cmCPackIFWPackage
*>::
const_iterator
pit
=
this
->
GroupPackages
.
find
(
group
);
return
pit
!=
this
->
GroupPackages
.
end
()
?
pit
->
second
:
CM_NULLPTR
;
return
pit
!=
this
->
GroupPackages
.
end
()
?
pit
->
second
:
nullptr
;
}
cmCPackIFWPackage
*
cmCPackIFWGenerator
::
GetComponentPackage
(
...
...
@@ -542,7 +542,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
{
std
::
map
<
cmCPackComponent
*
,
cmCPackIFWPackage
*>::
const_iterator
pit
=
this
->
ComponentPackages
.
find
(
component
);
return
pit
!=
this
->
ComponentPackages
.
end
()
?
pit
->
second
:
CM_NULLPTR
;
return
pit
!=
this
->
ComponentPackages
.
end
()
?
pit
->
second
:
nullptr
;
}
cmCPackIFWRepository
*
cmCPackIFWGenerator
::
GetRepository
(
...
...
@@ -564,7 +564,7 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
}
}
else
{
this
->
Repositories
.
erase
(
repositoryName
);
repository
=
CM_NULLPTR
;
repository
=
nullptr
;
cmCPackIFWLogger
(
WARNING
,
"Invalid repository
\"
"
<<
repositoryName
<<
"
\"
"
<<
" configuration. Repository will be skipped."
...
...
Source/CPack/IFW/cmCPackIFWPackage.cxx
View file @
5962db43
...
...
@@ -92,7 +92,7 @@ std::string cmCPackIFWPackage::DependenceStruct::NameWithCompare() const
//------------------------------------------------------ cmCPackIFWPackage ---
cmCPackIFWPackage
::
cmCPackIFWPackage
()
:
Installer
(
CM_NULLPTR
)
:
Installer
(
nullptr
)
{
}
...
...
Source/CPack/WiX/cmWIXPatchParser.cxx
View file @
5962db43
...
...
@@ -72,7 +72,7 @@ void cmWIXPatchParser::StartElement(const std::string& name, const char** atts)
void
cmWIXPatchParser
::
StartFragment
(
const
char
**
attributes
)
{
cmWIXPatchElement
*
new_element
=
CM_NULLPTR
;
cmWIXPatchElement
*
new_element
=
nullptr
;
/* find the id of for fragment */
for
(
size_t
i
=
0
;
attributes
[
i
];
i
+=
2
)
{
const
std
::
string
key
=
attributes
[
i
];
...
...
Source/CPack/cmCPackArchiveGenerator.cxx
View file @
5962db43
...
...
@@ -79,7 +79,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
++
fileIt
)
{
std
::
string
rp
=
filePrefix
+
*
fileIt
;
cmCPackLogger
(
cmCPackLog
::
LOG_DEBUG
,
"Adding file: "
<<
rp
<<
std
::
endl
);
archive
.
Add
(
rp
,
0
,
CM_NULLPTR
,
false
);
archive
.
Add
(
rp
,
0
,
nullptr
,
false
);
if
(
!
archive
)
{
cmCPackLogger
(
cmCPackLog
::
LOG_ERROR
,
"ERROR while packaging files: "
<<
archive
.
GetError
()
<<
std
::
endl
);
...
...
@@ -146,7 +146,7 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
for
(
compIt
=
this
->
Components
.
begin
();
compIt
!=
this
->
Components
.
end
();
++
compIt
)
{
// Does the component belong to a group?
if
(
compIt
->
second
.
Group
==
CM_NULLPTR
)
{
if
(
compIt
->
second
.
Group
==
nullptr
)
{
cmCPackLogger
(
cmCPackLog
::
LOG_VERBOSE
,
"Component <"
<<
compIt
->
second
.
Name
...
...
@@ -255,7 +255,7 @@ int cmCPackArchiveGenerator::PackageFiles()
// Get the relative path to the file
std
::
string
rp
=
cmSystemTools
::
RelativePath
(
toplevel
.
c_str
(),
fileIt
->
c_str
());
archive
.
Add
(
rp
,
0
,
CM_NULLPTR
,
false
);
archive
.
Add
(
rp
,
0
,
nullptr
,
false
);
if
(
!
archive
)
{
cmCPackLogger
(
cmCPackLog
::
LOG_ERROR
,
"Problem while adding file< "
<<
*
fileIt
<<
"> to archive <"
<<
packageFileNames
[
0
]
...
...
Source/CPack/cmCPackComponentGroup.h
View file @
5962db43
...
...
@@ -36,7 +36,7 @@ class cmCPackComponent
{
public:
cmCPackComponent
()
:
Group
(
CM_NULLPTR
)
:
Group
(
nullptr
)
,
IsRequired
(
true
)
,
IsHidden
(
false
)
,
IsDisabledByDefault
(
false
)
...
...
@@ -114,7 +114,7 @@ class cmCPackComponentGroup
{
public:
cmCPackComponentGroup
()
:
ParentGroup
(
CM_NULLPTR
)
:
ParentGroup
(
nullptr
)
{
}
...
...
Source/CPack/cmCPackDebGenerator.cxx
View file @
5962db43
...
...
@@ -129,7 +129,7 @@ int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
for
(
compIt
=
this
->
Components
.
begin
();
compIt
!=
this
->
Components
.
end
();
++
compIt
)
{
// Does the component belong to a group?
if
(
compIt
->
second
.
Group
==
CM_NULLPTR
)
{
if
(
compIt
->
second
.
Group
==
nullptr
)
{
cmCPackLogger
(
cmCPackLog
::
LOG_VERBOSE
,
"Component <"
<<
compIt
->
second
.
Name
...
...
@@ -713,7 +713,7 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std
::
string
groupVar
=
"CPACK_COMPONENT_"
+
cmSystemTools
::
UpperCase
(
componentName
)
+
"_GROUP"
;
if
(
CM_NULLPTR
!=
GetOption
(
groupVar
))
{
if
(
nullptr
!=
GetOption
(
groupVar
))
{
return
std
::
string
(
GetOption
(
groupVar
));
}
return
componentName
;
...
...
@@ -928,18 +928,18 @@ static int ar_append(const char* archive,
{
int
eval
=
0
;
FILE
*
aFile
=
cmSystemTools
::
Fopen
(
archive
,
"wb+"
);
if
(
aFile
!=
CM_NULLPTR
)
{
if
(
aFile
!=
nullptr
)
{
fwrite
(
ARMAG
,
SARMAG
,
1
,
aFile
);
if
(
fseek
(
aFile
,
0
,
SEEK_END
)
!=
-
1
)
{
CF
cf
;
struct
stat
sb
;
/* Read from disk, write to an archive; pad on write. */
SETCF
(
CM_NULLPTR
,
CM_NULLPTR
,
aFile
,
archive
,
WPAD
);
SETCF
(
nullptr
,
nullptr
,
aFile
,
archive
,
WPAD
);
for
(
std
::
vector
<
std
::
string
>::
const_iterator
fileIt
=
files
.
begin
();
fileIt
!=
files
.
end
();
++
fileIt
)
{
const
char
*
filename
=
fileIt
->
c_str
();
FILE
*
file
=
cmSystemTools
::
Fopen
(
filename
,
"rb"
);
if
(
file
==
CM_NULLPTR
)
{
if
(
file
==
nullptr
)
{
eval
=
-
1
;
continue
;
}
...
...
Source/CPack/cmCPackGenerator.cxx
View file @
5962db43
...
...
@@ -28,14 +28,14 @@
cmCPackGenerator
::
cmCPackGenerator
()
{
this
->
GeneratorVerbose
=
cmSystemTools
::
OUTPUT_NONE
;
this
->
MakefileMap
=
CM_NULLPTR
;
this
->
Logger
=
CM_NULLPTR
;
this
->
MakefileMap
=
nullptr
;
this
->
Logger
=
nullptr
;
this
->
componentPackageMethod
=
ONE_PACKAGE_PER_GROUP
;
}
cmCPackGenerator
::~
cmCPackGenerator
()
{
this
->
MakefileMap
=
CM_NULLPTR
;
this
->
MakefileMap
=
nullptr
;
}
void
cmCPackGeneratorProgress
(
const
char
*
msg
,
float
prog
,
void
*
ptr
)
...
...
@@ -156,7 +156,7 @@ int cmCPackGenerator::PrepareNames()
}
const
char
*
algoSignature
=
this
->
GetOption
(
"CPACK_PACKAGE_CHECKSUM"
);
if
(
algoSignature
)
{
if
(
cmCryptoHash
::
New
(
algoSignature
).
get
()
==
CM_NULLPTR
)
{
if
(
cmCryptoHash
::
New
(
algoSignature
).
get
()
==
nullptr
)
{
cmCPackLogger
(
cmCPackLog
::
LOG_ERROR
,
"Cannot recognize algorithm: "
<<
algoSignature
<<
std
::
endl
);
return
0
;
...
...
@@ -256,7 +256,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
int
retVal
=
1
;
bool
resB
=
cmSystemTools
::
RunSingleCommand
(
it
->
c_str
(),
&
output
,
&
output
,
&
retVal
,
CM_NULLPTR
,
this
->
GeneratorVerbose
,
0
);
nullptr
,
this
->
GeneratorVerbose
,
0
);
if
(
!
resB
||
retVal
)
{
std
::
string
tmpFile
=
this
->
GetOption
(
"CPACK_TOPLEVEL_DIRECTORY"
);
tmpFile
+=
"/InstallOutput.log"
;
...
...
@@ -820,8 +820,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
}
if
(
CM_NULLPTR
!=
mf
->
GetDefinition
(
"CPACK_ABSOLUTE_DESTINATION_FILES"
))
{
if
(
nullptr
!=
mf
->
GetDefinition
(
"CPACK_ABSOLUTE_DESTINATION_FILES"
))
{
if
(
!
absoluteDestFiles
.
empty
())
{
absoluteDestFiles
+=
";"
;
}
...
...
@@ -835,7 +834,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std
::
string
absoluteDestFileComponent
=
std
::
string
(
"CPACK_ABSOLUTE_DESTINATION_FILES"
)
+
"_"
+
GetComponentInstallDirNameSuffix
(
installComponent
);
if
(
CM_NULLPTR
!=
this
->
GetOption
(
absoluteDestFileComponent
))
{
if
(
nullptr
!=
this
->
GetOption
(
absoluteDestFileComponent
))
{
std
::
string
absoluteDestFilesListComponent
=
this
->
GetOption
(
absoluteDestFileComponent
);
absoluteDestFilesListComponent
+=
";"
;
...
...
@@ -1016,7 +1015,7 @@ int cmCPackGenerator::DoPackage()
<<
packageFileName
<<
" generated."
<<
std
::
endl
);
/* Generate checksum file */
if
(
crypto
.
get
()
!=
CM_NULLPTR
)
{
if
(
crypto
.
get
()
!=
nullptr
)
{
std
::
string
hashFile
(
this
->
GetOption
(
"CPACK_OUTPUT_FILE_PREFIX"
));
hashFile
+=
"/"
+
filename
.
substr
(
0
,
filename
.
rfind
(
this
->
GetOutputExtension
()));
...
...
@@ -1225,7 +1224,7 @@ int cmCPackGenerator::PrepareGroupingKind()
std
::
string
groupingType
;
// Second way to specify grouping
if
(
CM_NULLPTR
!=
this
->
GetOption
(
"CPACK_COMPONENTS_GROUPING"
))
{
if
(
nullptr
!=
this
->
GetOption
(
"CPACK_COMPONENTS_GROUPING"
))
{
groupingType
=
this
->
GetOption
(
"CPACK_COMPONENTS_GROUPING"
);
}
...
...
@@ -1407,7 +1406,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
component
->
Group
=
GetComponentGroup
(
projectName
,
groupName
);
component
->
Group
->
Components
.
push_back
(
component
);
}
else
{
component
->
Group
=
CM_NULLPTR
;
component
->
Group
=
nullptr
;
}
const
char
*
description
=
this
->
GetOption
(
macroPrefix
+
"_DESCRIPTION"
);
...
...
@@ -1475,7 +1474,7 @@ cmCPackComponentGroup* cmCPackGenerator::GetComponentGroup(
group
->
ParentGroup
=
GetComponentGroup
(
projectName
,
parentGroupName
);
group
->
ParentGroup
->
Subgroups
.
push_back
(
group
);
}
else
{
group
->
ParentGroup
=
CM_NULLPTR
;
group
->
ParentGroup
=
nullptr
;
}
}
return
group
;
...
...
Source/CPack/cmCPackGenerator.h
View file @
5962db43
...
...
@@ -105,7 +105,7 @@ protected:
cmInstalledFile
const
*
GetInstalledFile
(
std
::
string
const
&
name
)
const
;
virtual
const
char
*
GetOutputExtension
()
{
return
".cpack"
;
}
virtual
const
char
*
GetOutputPostfix
()
{
return
CM_NULLPTR
;
}
virtual
const
char
*
GetOutputPostfix
()
{
return
nullptr
;
}
/**
* Prepare requested grouping kind from CPACK_xxx vars
...
...
Source/CPack/cmCPackGeneratorFactory.cxx
View file @
5962db43
...
...
@@ -153,7 +153,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(
{
cmCPackGenerator
*
gen
=
this
->
NewGeneratorInternal
(
name
);
if
(
!
gen
)
{
return
CM_NULLPTR
;
return
nullptr
;
}
this
->
Generators
.
push_back
(
gen
);
gen
->
SetLogger
(
this
->
Logger
);
...
...
@@ -166,7 +166,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
cmCPackGeneratorFactory
::
t_GeneratorCreatorsMap
::
iterator
it
=
this
->
GeneratorCreators
.
find
(
name
);
if
(
it
==
this
->
GeneratorCreators
.
end
())
{
return
CM_NULLPTR
;
return
nullptr
;
}
return
(
it
->
second
)();
}
...
...
Source/CPack/cmCPackLog.cxx
View file @
5962db43
...
...
@@ -19,13 +19,13 @@ cmCPackLog::cmCPackLog()
this
->
DefaultOutput
=
&
std
::
cout
;
this
->
DefaultError
=
&
std
::
cerr
;
this
->
LogOutput
=
CM_NULLPTR
;
this
->
LogOutput
=
nullptr
;
this
->
LogOutputCleanup
=
false
;
}
cmCPackLog
::~
cmCPackLog
()
{
this
->
SetLogOutputStream
(
CM_NULLPTR
);
this
->
SetLogOutputStream
(
nullptr
);
}
void
cmCPackLog
::
SetLogOutputStream
(
std
::
ostream
*
os
)
...
...
@@ -39,13 +39,13 @@ void cmCPackLog::SetLogOutputStream(std::ostream* os)
bool
cmCPackLog
::
SetLogOutputFile
(
const
char
*
fname
)
{
cmGeneratedFileStream
*
cg
=
CM_NULLPTR
;
cmGeneratedFileStream
*
cg
=
nullptr
;
if
(
fname
)
{
cg
=
new
cmGeneratedFileStream
(
fname
);
}
if
(
cg
&&
!*
cg
)
{
delete
cg
;
cg
=
CM_NULLPTR
;
cg
=
nullptr
;
}
this
->
SetLogOutputStream
(
cg
);
if
(
!
cg
)
{
...
...
Source/CPack/cmCPackNSISGenerator.cxx
View file @
5962db43
...
...
@@ -222,7 +222,7 @@ int cmCPackNSISGenerator::PackageFiles()
std
::
map
<
std
::
string
,
cmCPackComponentGroup
>::
iterator
groupIt
;
for
(
groupIt
=
this
->
ComponentGroups
.
begin
();
groupIt
!=
this
->
ComponentGroups
.
end
();
++
groupIt
)
{
if
(
groupIt
->
second
.
ParentGroup
==
CM_NULLPTR
)
{
if
(
groupIt
->
second
.
ParentGroup
==
nullptr
)
{
componentCode
+=
this
->
CreateComponentGroupDescription
(
&
groupIt
->
second
,
macrosOut
);
}
...
...
@@ -313,7 +313,7 @@ int cmCPackNSISGenerator::PackageFiles()
int
retVal
=
1
;
bool
res
=
cmSystemTools
::
RunSingleCommand
(
nsisCmd
.
c_str
(),
&
output
,
&
output
,
&
retVal
,
CM_NULLPTR
,
this
->
GeneratorVerbose
,
0
);
nullptr
,
this
->
GeneratorVerbose
,
0
);
if
(
!
res
||
retVal
)
{
cmGeneratedFileStream
ofs
(
tmpFile
.
c_str
());
ofs
<<
"# Run command: "
<<
nsisCmd
<<
std
::
endl
...
...
@@ -337,7 +337,7 @@ int cmCPackNSISGenerator::InitializeInternal()
"NSIS Generator cannot work with CPACK_INCLUDE_TOPLEVEL_DIRECTORY set. "
"This option will be reset to 0 (for this generator only)."
<<
std
::
endl
);
this
->
SetOption
(
"CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
,
CM_NULLPTR
);
this
->
SetOption
(
"CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
,
nullptr
);
}
cmCPackLogger
(
cmCPackLog
::
LOG_DEBUG
,
"cmCPackNSISGenerator::Initialize()"
...
...
@@ -412,7 +412,7 @@ int cmCPackNSISGenerator::InitializeInternal()
int
retVal
=
1
;
bool
resS
=
cmSystemTools
::
RunSingleCommand
(
nsisCmd
.
c_str
(),
&
output
,
&
output
,
&
retVal
,
CM_NULLPTR
,
this
->
GeneratorVerbose
,
0
);
nullptr
,
this
->
GeneratorVerbose
,
0
);
cmsys
::
RegularExpression
versionRex
(
"v([0-9]+.[0-9]+)"
);
cmsys
::
RegularExpression
versionRexCVS
(
"v(.*)
\\
.cvs"
);
if
(
!
resS
||
retVal
||
...
...
Source/CPack/cmCPackRPMGenerator.cxx
View file @
5962db43
...
...
@@ -148,7 +148,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for
(
compIt
=
this
->
Components
.
begin
();
compIt
!=
this
->
Components
.
end
();
++
compIt
)
{
// Does the component belong to a group?
if
(
compIt
->
second
.
Group
==
CM_NULLPTR
)
{
if
(
compIt
->
second
.
Group
==
nullptr
)
{
std
::
string
component
(
compIt
->
first
);
std
::
transform
(
component
.
begin
(),
component
.
end
(),
component
.
begin
(),
::
toupper
);
...
...
@@ -214,7 +214,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for
(
compIt
=
this
->
Components
.
begin
();
compIt
!=
this
->
Components
.
end
();
++
compIt
)
{
// Does the component belong to a group?
if
(
compIt
->
second
.
Group
==
CM_NULLPTR
)
{
if
(
compIt
->
second
.
Group
==
nullptr
)
{
std
::
string
component
(
compIt
->
first
);
std
::
transform
(
component
.
begin
(),
component
.
end
(),
component
.
begin
(),
::
toupper
);
...
...
@@ -299,7 +299,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for
(
compIt
=
this
->
Components
.
begin
();
compIt
!=
this
->
Components
.
end
();
++
compIt
)
{
// Does the component belong to a group?
if
(
compIt
->
second
.
Group
==
CM_NULLPTR
)
{
if
(
compIt
->
second
.
Group
==
nullptr
)
{
cmCPackLogger
(
cmCPackLog
::
LOG_VERBOSE
,
"Component <"
<<
compIt
->
second
.
Name
...
...
@@ -430,7 +430,7 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std
::
string
groupVar
=
"CPACK_COMPONENT_"
+
cmSystemTools
::
UpperCase
(
componentName
)
+
"_GROUP"
;
if
(
CM_NULLPTR
!=
GetOption
(
groupVar
))
{
if
(
nullptr
!=
GetOption
(
groupVar
))
{
return
std
::
string
(
GetOption
(
groupVar
));
}
return
componentName
;
...
...
Source/CPack/cpack.cxx
View file @
5962db43
...
...
@@ -29,13 +29,13 @@
#include "cmake.h"
static
const
char
*
cmDocumentationName
[][
2
]
=
{
{
CM_NULLPTR
,
" cpack - Packaging driver provided by CMake."
},
{
CM_NULLPTR
,
CM_NULLPTR
}
{
nullptr
,
" cpack - Packaging driver provided by CMake."
},
{
nullptr
,
nullptr
}
};
static
const
char
*
cmDocumentationUsage
[][
2
]
=
{
{
CM_NULLPTR
,
" cpack -G <generator> [options]"
},
{
CM_NULLPTR
,
CM_NULLPTR
}
{
nullptr
,
" cpack -G <generator> [options]"
},
{
nullptr
,
nullptr
}
};
static
const
char
*
cmDocumentationOptions
[][
2
]
=
{
...
...
@@ -49,7 +49,7 @@ static const char* cmDocumentationOptions[][2] = {
{
"-R <package version>"
,
"override/define CPACK_PACKAGE_VERSION"
},
{
"-B <package directory>"
,
"override/define CPACK_PACKAGE_DIRECTORY"
},
{
"--vendor <vendor name>"
,
"override/define CPACK_PACKAGE_VENDOR"
},
{
CM_NULLPTR
,
CM_NULLPTR
}
{
nullptr
,
nullptr
}
};
int
cpackUnknownArgument
(
const
char
*
/*unused*/
,
void
*
/*unused*/
)
...
...
@@ -208,7 +208,7 @@ int main(int argc, char const* const* argv)
cmCPackGeneratorFactory
generators
;
generators
.
SetLogger
(
&
log
);
cmCPackGenerator
*
cpackGenerator
=
CM_NULLPTR
;
cmCPackGenerator
*
cpackGenerator
=
nullptr
;
cmDocumentation
doc
;
doc
.
addCPackStandardDocSections
();
...
...
Source/CTest/cmCTestBZR.cxx
View file @
5962db43
...
...
@@ -136,13 +136,13 @@ std::string cmCTestBZR::LoadInfo()
{
// Run "bzr info" to get the repository info from the work tree.
const
char
*
bzr
=
this
->
CommandLineTool
.
c_str
();
const
char
*
bzr_info
[]
=
{
bzr
,
"info"
,
CM_NULLPTR
};
const
char
*
bzr_info
[]
=
{
bzr
,
"info"
,
nullptr
};
InfoParser
iout
(
this
,
"info-out> "
);
OutputLogger
ierr
(
this
->
Log
,
"info-err> "
);
this
->
RunChild
(
bzr_info
,
&
iout
,
&
ierr
);
// Run "bzr revno" to get the repository revision number from the work tree.
const
char
*
bzr_revno
[]
=
{
bzr
,
"revno"
,
CM_NULLPTR
};
const
char
*
bzr_revno
[]
=
{
bzr
,
"revno"
,
nullptr
};
std
::
string
rev
;
RevnoParser
rout
(
this
,
"revno-out> "
,
rev
);
OutputLogger
rerr
(
this
->
Log
,
"revno-err> "
);
...
...
@@ -190,7 +190,7 @@ public:
if
(
res
)
{
XML_SetUnknownEncodingHandler
(
static_cast
<
XML_Parser
>
(
this
->
Parser
),
cmBZRXMLParserUnknownEncodingHandler
,
CM_NULLPTR
);
nullptr
);
}
return
res
;
}
...
...
@@ -380,7 +380,7 @@ bool cmCTestBZR::UpdateImpl()
bzr_update
.
push_back
(
this
->
URL
.
c_str
());
bzr_update
.
push_back
(
CM_NULLPTR
);
bzr_update
.
push_back
(
nullptr
);
// For some reason bzr uses stderr to display the update status.
OutputLogger
out
(
this
->
Log
,
"pull-out> "
);
...
...
@@ -408,8 +408,7 @@ bool cmCTestBZR::LoadRevisions()
// Run "bzr log" to get all global revisions of interest.
const
char
*
bzr
=
this
->
CommandLineTool
.
c_str
();
const
char
*
bzr_log
[]
=
{
bzr
,
"log"
,
"-v"
,
"-r"
,
revs
.
c_str
(),
"--xml"
,
this
->
URL
.
c_str
(),
CM_NULLPTR
bzr
,
"log"
,
"-v"
,
"-r"
,
revs
.
c_str
(),
"--xml"
,
this
->
URL
.
c_str
(),
nullptr
};
{
LogParser
out
(
this
,
"log-out> "
);
...
...
@@ -467,7 +466,7 @@ bool cmCTestBZR::LoadModifications()
{
// Run "bzr status" which reports local modifications.
const
char
*
bzr
=
this
->
CommandLineTool
.
c_str
();
const
char
*
bzr_status
[]
=
{
bzr
,
"status"
,
"-SV"
,
CM_NULLPTR
};
const
char
*
bzr_status
[]
=
{
bzr
,
"status"
,
"-SV"
,
nullptr
};
StatusParser
out
(
this
,
"status-out> "
);
OutputLogger
err
(
this
->
Log
,
"status-err> "
);
this
->
RunChild
(
bzr_status
,
&
out
,
&
err
);
...
...
Source/CTest/cmCTestBuildAndTestHandler.cxx
View file @
5962db43
...
...
@@ -65,7 +65,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
args
.
push_back
(
toolset
);
}
const
char
*
config
=
CM_NULLPTR
;
const
char
*
config
=
nullptr
;
if
(
!
this
->
CTest
->
GetConfigType
().
empty
())
{
config
=
this
->
CTest
->
GetConfigType
().
c_str
();
}
...
...
@@ -148,10 +148,10 @@ public:
}
~
cmCTestBuildAndTestCaptureRAII
()
{
this
->
CM
.
SetProgressCallback
(
CM_NULLPTR
,
CM_NULLPTR
);
cmSystemTools
::
SetStderrCallback
(
CM_NULLPTR
,
CM_NULLPTR
);
cmSystemTools
::
SetStdoutCallback
(
CM_NULLPTR
,
CM_NULLPTR
);
cmSystemTools
::
SetMessageCallback
(
CM_NULLPTR
,
CM_NULLPTR
);
this
->
CM
.
SetProgressCallback
(
nullptr
,
nullptr
);
cmSystemTools
::
SetStderrCallback
(
nullptr
,
nullptr
);
cmSystemTools
::
SetStdoutCallback
(
nullptr
,
nullptr
);
cmSystemTools
::
SetMessageCallback
(
nullptr
,
nullptr
);
}
};
...
...
@@ -236,7 +236,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
std
::
string
output
;
const
char
*
config
=
CM_NULLPTR
;
const
char
*
config
=
nullptr
;
if
(
!
this
->
CTest
->
GetConfigType
().
empty
())
{
config
=
this
->
CTest
->
GetConfigType
().
c_str
();
}
...
...
@@ -308,7 +308,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
for
(
size_t
k
=
0
;
k
<
this
->
TestCommandArgs
.
size
();
++
k
)
{
testCommand
.
push_back
(
this
->
TestCommandArgs
[
k
].
c_str
());
}
testCommand
.
push_back
(
CM_NULLPTR
);
testCommand
.
push_back
(
nullptr
);
std
::
string
outs
;
int
retval
=
0
;
// run the test from the this->BuildRunDir if set
...
...
@@ -334,8 +334,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
int
runTestRes
=
this
->
CTest
->
RunTest
(
testCommand
,
&
outs
,
&
retval
,
CM_NULLPTR
,
remainingTime
,
CM_NULLPTR
);
int
runTestRes
=
this
->
CTest
->
RunTest
(
testCommand
,
&
outs
,
&
retval
,
nullptr
,
remainingTime
,
nullptr
);
if
(
runTestRes
!=
cmsysProcess_State_Exited
||
retval
!=
0
)
{
out
<<
"Test command failed: "
<<
testCommand
[
0
]
<<
"
\n
"
;
...
...
Source/CTest/cmCTestBuildCommand.cxx
View file @
5962db43
...
...
@@ -17,14 +17,14 @@ class cmExecutionStatus;
cmCTestBuildCommand
::
cmCTestBuildCommand
()
{
this
->
GlobalGenerator
=
CM_NULLPTR
;
this
->
GlobalGenerator
=
nullptr
;
this
->
Arguments
[
ctb_NUMBER_ERRORS
]
=
"NUMBER_ERRORS"
;
this
->
Arguments
[
ctb_NUMBER_WARNINGS
]
=
"NUMBER_WARNINGS"
;
this
->
Arguments
[
ctb_TARGET
]
=
"TARGET"
;
this
->
Arguments
[
ctb_CONFIGURATION
]
=
"CONFIGURATION"
;
this
->
Arguments
[
ctb_FLAGS
]
=
"FLAGS"
;
this
->
Arguments
[
ctb_PROJECT_NAME
]
=
"PROJECT_NAME"
;
this
->
Arguments
[
ctb_LAST
]
=
CM_NULLPTR
;
this
->
Arguments
[
ctb_LAST
]
=
nullptr
;
this
->
Last
=
ctb_LAST
;
}
...
...
@@ -32,7 +32,7 @@ cmCTestBuildCommand::~cmCTestBuildCommand()
{
if
(
this
->
GlobalGenerator
)
{
delete
this
->
GlobalGenerator
;
this
->
GlobalGenerator
=
CM_NULLPTR
;
this
->
GlobalGenerator
=
nullptr
;
}
}
...
...
@@ -41,7 +41,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmCTestGenericHandler
*
handler
=
this
->
CTest
->
GetInitializedHandler
(
"build"
);
if
(
!
handler
)
{
this
->
SetError
(
"internal CTest error. Cannot instantiate build handler"
);
return
CM_NULLPTR
;
return
nullptr
;
}
this
->
Handler
=
(
cmCTestBuildHandler
*
)
handler
;
...
...
@@ -89,7 +89,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
if
(
this
->
GlobalGenerator
)
{
if
(
this
->
GlobalGenerator
->
GetName
()
!=
cmakeGeneratorName
)
{
delete
this
->
GlobalGenerator
;
this
->
GlobalGenerator
=
CM_NULLPTR
;
this
->
GlobalGenerator
=
nullptr
;
}
}
if
(
!
this
->
GlobalGenerator
)
{
...
...
@@ -102,11 +102,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()