summaryrefslogtreecommitdiff
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-02 11:43:35 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-03 11:44:38 +0200
commit0962589627f9bb3399d8144fc8252e47484bc0b3 (patch)
tree7711ef77ffcb23308355eb54520d0fd8cd9fb7ac /Source/cmake.h
parent2a5d077a89ea3ef08409e4d3e043ae78c9d8132d (diff)
downloadcmake-0962589627f9bb3399d8144fc8252e47484bc0b3.tar.gz
cmake: Initialize booleans at declaration and cleanup constructor
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 6aa00e147f..92494aed92 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -509,14 +509,14 @@ protected:
void AddDefaultGenerators();
void AddDefaultExtraGenerators();
- cmGlobalGenerator* GlobalGenerator;
+ cmGlobalGenerator* GlobalGenerator = nullptr;
std::map<std::string, DiagLevel> DiagLevels;
std::string GeneratorInstance;
std::string GeneratorPlatform;
std::string GeneratorToolset;
- bool GeneratorInstanceSet;
- bool GeneratorPlatformSet;
- bool GeneratorToolsetSet;
+ bool GeneratorInstanceSet = false;
+ bool GeneratorPlatformSet = false;
+ bool GeneratorToolsetSet = false;
//! read in a cmake list file to initialize the cache
void ReadListFile(const std::vector<std::string>& args,
@@ -543,14 +543,14 @@ protected:
private:
ProgressCallbackType ProgressCallback;
- WorkingMode CurrentWorkingMode;
- bool DebugOutput;
- bool Trace;
- bool TraceExpand;
- bool WarnUninitialized;
- bool WarnUnused;
- bool WarnUnusedCli;
- bool CheckSystemVars;
+ WorkingMode CurrentWorkingMode = NORMAL_MODE;
+ bool DebugOutput = false;
+ bool Trace = false;
+ bool TraceExpand = false;
+ bool WarnUninitialized = false;
+ bool WarnUnused = false;
+ bool WarnUnusedCli = true;
+ bool CheckSystemVars = false;
std::map<std::string, bool> UsedCliVariables;
std::string CMakeEditCommand;
std::string CXXEnvironment;
@@ -564,8 +564,8 @@ private:
FileExtensions HeaderFileExtensions;
FileExtensions CudaFileExtensions;
FileExtensions FortranFileExtensions;
- bool ClearBuildSystem;
- bool DebugTryCompile;
+ bool ClearBuildSystem = false;
+ bool DebugTryCompile = false;
std::unique_ptr<cmFileTimeCache> FileTimeCache;
std::string GraphVizFile;
InstalledFilesMap InstalledFiles;