diff options
author | Kitware Robot <kwrobot@kitware.com> | 2016-05-16 14:34:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-16 20:05:19 (GMT) |
commit | d9fd2f5402eeaa345691313658e02b51038f570b (patch) | |
tree | dca71b9a7e267f4c6300da3eb770415381726785 /Source/cmGlobalUnixMakefileGenerator3.h | |
parent | 82df6deaafb36cbbfd450202bb20b320f637751a (diff) | |
download | CMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2 |
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.h')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 97 |
1 files changed, 51 insertions, 46 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index b035df4..f951b2a 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -56,14 +56,18 @@ class cmGlobalUnixMakefileGenerator3 : public cmGlobalCommonGenerator { public: cmGlobalUnixMakefileGenerator3(cmake* cm); - static cmGlobalGeneratorFactory* NewFactory() { - return new cmGlobalGeneratorSimpleFactory - <cmGlobalUnixMakefileGenerator3>(); } + static cmGlobalGeneratorFactory* NewFactory() + { + return new cmGlobalGeneratorSimpleFactory< + cmGlobalUnixMakefileGenerator3>(); + } ///! Get the name for the generator. - virtual std::string GetName() const { - return cmGlobalUnixMakefileGenerator3::GetActualName();} - static std::string GetActualName() {return "Unix Makefiles";} + virtual std::string GetName() const + { + return cmGlobalUnixMakefileGenerator3::GetActualName(); + } + static std::string GetActualName() { return "Unix Makefiles"; } /** * Utilized by the generator factory to determine if this generator @@ -74,14 +78,14 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf); + virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf); /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vector<std::string>const& languages, - cmMakefile *, bool optional); + virtual void EnableLanguage(std::vector<std::string> const& languages, + cmMakefile*, bool optional); virtual void Configure(); @@ -92,17 +96,16 @@ public: */ virtual void Generate(); - void WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream, - std::vector<cmLocalGenerator *> &); + std::vector<cmLocalGenerator*>&); // write out the help rule listing the valid targets void WriteHelpRule(std::ostream& ruleFileStream, - cmLocalUnixMakefileGenerator3 *); + cmLocalUnixMakefileGenerator3*); // write the top level target rules void WriteConvenienceRules(std::ostream& ruleFileStream, - std::set<std::string> &emitted); + std::set<std::string>& emitted); /** Get the command to use for a target that has no rule. This is used for multiple output dependencies and for cmake_force. */ @@ -114,22 +117,18 @@ public: // change the build command for speed virtual void GenerateBuildCommand( - std::vector<std::string>& makeCommand, - const std::string& makeProgram, - const std::string& projectName, - const std::string& projectDir, - const std::string& targetName, - const std::string& config, - bool fast, bool verbose, - std::vector<std::string> const& makeOptions = std::vector<std::string>() - ); + std::vector<std::string>& makeCommand, const std::string& makeProgram, + const std::string& projectName, const std::string& projectDir, + const std::string& targetName, const std::string& config, bool fast, + bool verbose, + std::vector<std::string> const& makeOptions = std::vector<std::string>()); /** Record per-target progress information. */ void RecordTargetProgress(cmMakefileTargetGenerator* tg); - void AddCXXCompileCommand(const std::string &sourceFile, - const std::string &workingDirectory, - const std::string &compileCommand); + void AddCXXCompileCommand(const std::string& sourceFile, + const std::string& workingDirectory, + const std::string& compileCommand); /** Does the make tool tolerate .NOTPARALLEL? */ virtual bool AllowNotParallel() const { return true; } @@ -143,6 +142,7 @@ public: bool DefineWindowsNULL; bool PassMakeflags; bool UnixCD; + protected: void WriteMainMakefile2(); void WriteMainCMakefile(); @@ -151,9 +151,8 @@ protected: cmLocalUnixMakefileGenerator3*); void WriteDirectoryRule2(std::ostream& ruleFileStream, - cmLocalUnixMakefileGenerator3* lg, - const char* pass, bool check_all, - bool check_relink); + cmLocalUnixMakefileGenerator3* lg, const char* pass, + bool check_all, bool check_relink); void WriteDirectoryRules2(std::ostream& ruleFileStream, cmLocalUnixMakefileGenerator3* lg); @@ -164,17 +163,17 @@ protected: bool NeedRequiresStep(cmGeneratorTarget const*); // Target name hooks for superclass. - const char* GetAllTargetName() const { return "all"; } - const char* GetInstallTargetName() const { return "install"; } - const char* GetInstallLocalTargetName() const { return "install/local"; } - const char* GetInstallStripTargetName() const { return "install/strip"; } - const char* GetPreinstallTargetName() const { return "preinstall"; } - const char* GetTestTargetName() const { return "test"; } - const char* GetPackageTargetName() const { return "package"; } + const char* GetAllTargetName() const { return "all"; } + const char* GetInstallTargetName() const { return "install"; } + const char* GetInstallLocalTargetName() const { return "install/local"; } + const char* GetInstallStripTargetName() const { return "install/strip"; } + const char* GetPreinstallTargetName() const { return "preinstall"; } + const char* GetTestTargetName() const { return "test"; } + const char* GetPackageTargetName() const { return "package"; } const char* GetPackageSourceTargetName() const { return "package_source"; } - const char* GetEditCacheTargetName() const { return "edit_cache"; } - const char* GetRebuildCacheTargetName() const { return "rebuild_cache"; } - const char* GetCleanTargetName() const { return "clean"; } + const char* GetEditCacheTargetName() const { return "edit_cache"; } + const char* GetRebuildCacheTargetName() const { return "rebuild_cache"; } + const char* GetCleanTargetName() const { return "clean"; } virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; } @@ -193,28 +192,34 @@ protected: // Store per-target progress counters. struct TargetProgress { - TargetProgress(): NumberOfActions(0) {} + TargetProgress() + : NumberOfActions(0) + { + } unsigned long NumberOfActions; std::string VariableFile; std::vector<unsigned long> Marks; void WriteProgressVariables(unsigned long total, unsigned long& current); }; typedef std::map<cmGeneratorTarget const*, TargetProgress, - cmGeneratorTarget::StrictTargetComparison> ProgressMapType; + cmGeneratorTarget::StrictTargetComparison> + ProgressMapType; ProgressMapType ProgressMap; - size_t CountProgressMarksInTarget(cmGeneratorTarget const* target, - std::set<cmGeneratorTarget const*>& emitted); + size_t CountProgressMarksInTarget( + cmGeneratorTarget const* target, + std::set<cmGeneratorTarget const*>& emitted); size_t CountProgressMarksInAll(cmLocalGenerator* lg); - cmGeneratedFileStream *CommandDatabase; + cmGeneratedFileStream* CommandDatabase; + private: virtual const char* GetBuildIgnoreErrorsFlag() const { return "-i"; } virtual std::string GetEditCacheCommand() const; - std::map<cmState::Snapshot, - std::set<cmGeneratorTarget const*>, - cmState::Snapshot::StrictWeakOrder> DirectoryTargetsMap; + std::map<cmState::Snapshot, std::set<cmGeneratorTarget const*>, + cmState::Snapshot::StrictWeakOrder> + DirectoryTargetsMap; virtual void InitializeProgressMarks(); }; |