diff options
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.h')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 91 |
1 files changed, 38 insertions, 53 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index a656102fb..79db30ebd 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -3,12 +3,12 @@ #ifndef cmGlobalUnixMakefileGenerator3_h #define cmGlobalUnixMakefileGenerator3_h -#include "cmConfigure.h" +#include "cmConfigure.h" // IWYU pragma: keep +#include <cstddef> #include <iosfwd> #include <map> #include <set> -#include <stddef.h> #include <string> #include <vector> @@ -67,8 +67,8 @@ public: cmGlobalUnixMakefileGenerator3>(); } - ///! Get the name for the generator. - std::string GetName() const CM_OVERRIDE + //! Get the name for the generator. + std::string GetName() const override { return cmGlobalUnixMakefileGenerator3::GetActualName(); } @@ -89,23 +89,23 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) CM_OVERRIDE; + cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) override; /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*, - bool optional) CM_OVERRIDE; + bool optional) override; - void Configure() CM_OVERRIDE; + void Configure() override; /** * Generate the all required files for building this project/tree. This * basically creates a series of LocalGenerators for each directory and * requests that they Generate. */ - void Generate() CM_OVERRIDE; + void Generate() override; void WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream, std::vector<cmLocalGenerator*>&); @@ -127,14 +127,12 @@ public: std::string GetEmptyRuleHackDepends() { return this->EmptyRuleHackDepends; } // change the build command for speed - 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>()) CM_OVERRIDE; + std::vector<GeneratedMakeCommand> GenerateBuildCommand( + const std::string& makeProgram, const std::string& projectName, + const std::string& projectDir, std::vector<std::string> const& targetNames, + const std::string& config, bool fast, int jobs, bool verbose, + std::vector<std::string> const& makeOptions = + std::vector<std::string>()) override; /** Record per-target progress information. */ void RecordTargetProgress(cmMakefileTargetGenerator* tg); @@ -149,9 +147,9 @@ public: /** Does the make tool tolerate .DELETE_ON_ERROR? */ virtual bool AllowDeleteOnError() const { return true; } - bool IsIPOSupported() const CM_OVERRIDE { return true; } + bool IsIPOSupported() const override { return true; } - void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const CM_OVERRIDE; + void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const override; std::string IncludeDirective; bool DefineWindowsNULL; @@ -166,49 +164,41 @@ protected: cmLocalUnixMakefileGenerator3*); void WriteDirectoryRule2(std::ostream& ruleFileStream, - cmLocalUnixMakefileGenerator3* lg, const char* pass, - bool check_all, bool check_relink); + DirectoryTarget const& dt, const char* pass, + bool check_all, bool check_relink, + std::vector<std::string> const& commands = {}); void WriteDirectoryRules2(std::ostream& ruleFileStream, - cmLocalUnixMakefileGenerator3* lg); + DirectoryTarget const& dt); void AppendGlobalTargetDepends(std::vector<std::string>& depends, cmGeneratorTarget* target); - // does this generator need a requires step for any of its targets - bool NeedRequiresStep(cmGeneratorTarget const*); - // Target name hooks for superclass. - const char* GetAllTargetName() const CM_OVERRIDE { return "all"; } - const char* GetInstallTargetName() const CM_OVERRIDE { return "install"; } - const char* GetInstallLocalTargetName() const CM_OVERRIDE + const char* GetAllTargetName() const override { return "all"; } + const char* GetInstallTargetName() const override { return "install"; } + const char* GetInstallLocalTargetName() const override { return "install/local"; } - const char* GetInstallStripTargetName() const CM_OVERRIDE + const char* GetInstallStripTargetName() const override { return "install/strip"; } - const char* GetPreinstallTargetName() const CM_OVERRIDE - { - return "preinstall"; - } - const char* GetTestTargetName() const CM_OVERRIDE { return "test"; } - const char* GetPackageTargetName() const CM_OVERRIDE { return "package"; } - const char* GetPackageSourceTargetName() const CM_OVERRIDE + const char* GetPreinstallTargetName() const override { return "preinstall"; } + const char* GetTestTargetName() const override { return "test"; } + const char* GetPackageTargetName() const override { return "package"; } + const char* GetPackageSourceTargetName() const override { return "package_source"; } - const char* GetEditCacheTargetName() const CM_OVERRIDE - { - return "edit_cache"; - } - const char* GetRebuildCacheTargetName() const CM_OVERRIDE + const char* GetEditCacheTargetName() const override { return "edit_cache"; } + const char* GetRebuildCacheTargetName() const override { return "rebuild_cache"; } - const char* GetCleanTargetName() const CM_OVERRIDE { return "clean"; } + const char* GetCleanTargetName() const override { return "clean"; } - bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const CM_OVERRIDE { return true; } + bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const override { return true; } // Some make programs (Borland) do not keep a rule if there are no // dependencies or commands. This is a problem for creating rules @@ -225,18 +215,13 @@ protected: // Store per-target progress counters. struct TargetProgress { - TargetProgress() - : NumberOfActions(0) - { - } - unsigned long NumberOfActions; + unsigned long NumberOfActions = 0; 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; + using ProgressMapType = std::map<cmGeneratorTarget const*, TargetProgress, + cmGeneratorTarget::StrictTargetComparison>; ProgressMapType ProgressMap; size_t CountProgressMarksInTarget( @@ -247,13 +232,13 @@ protected: cmGeneratedFileStream* CommandDatabase; private: - const char* GetBuildIgnoreErrorsFlag() const CM_OVERRIDE { return "-i"; } - std::string GetEditCacheCommand() const CM_OVERRIDE; + const char* GetBuildIgnoreErrorsFlag() const override { return "-i"; } + std::string GetEditCacheCommand() const override; std::map<cmStateSnapshot, std::set<cmGeneratorTarget const*>, cmStateSnapshot::StrictWeakOrder> DirectoryTargetsMap; - void InitializeProgressMarks() CM_OVERRIDE; + void InitializeProgressMarks() override; }; #endif |