diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:03 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:03 +0900 |
commit | d140263a497b4a86818ab5e2017a66df43eb83fb (patch) | |
tree | 4acfe8c906ce669c5fc92689df2c3c83a32d881c /Source/cmMakefile.h | |
parent | e1763ae434c946bd1c1e9a7cc66a905ebe027bbd (diff) | |
download | cmake-d140263a497b4a86818ab5e2017a66df43eb83fb.tar.gz cmake-d140263a497b4a86818ab5e2017a66df43eb83fb.tar.bz2 cmake-d140263a497b4a86818ab5e2017a66df43eb83fb.zip |
Imported Upstream version 3.15.0upstream/3.15.0
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 70a5689e1..d22334751 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -150,7 +150,7 @@ public: const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type, const char* comment, const char* workingDir, bool escapeOldStyle = true, bool uses_terminal = false, const std::string& depfile = "", - bool command_expand_lists = false, + const std::string& job_pool = "", bool command_expand_lists = false, ObjectLibraryCommands objLibraryCommands = RejectObjectLibraryCommands); cmSourceFile* AddCustomCommandToOutput( const std::vector<std::string>& outputs, @@ -160,14 +160,14 @@ public: const cmCustomCommandLines& commandLines, const char* comment, const char* workingDir, bool replace = false, bool escapeOldStyle = true, bool uses_terminal = false, bool command_expand_lists = false, - const std::string& depfile = ""); + const std::string& depfile = "", const std::string& job_pool = ""); cmSourceFile* AddCustomCommandToOutput( const std::string& output, const std::vector<std::string>& depends, const std::string& main_dependency, const cmCustomCommandLines& commandLines, const char* comment, const char* workingDir, bool replace = false, bool escapeOldStyle = true, bool uses_terminal = false, bool command_expand_lists = false, - const std::string& depfile = ""); + const std::string& depfile = "", const std::string& job_pool = ""); void AddCustomCommandOldStyle(const std::string& target, const std::vector<std::string>& outputs, const std::vector<std::string>& depends, @@ -223,14 +223,14 @@ public: const char* workingDirectory, const std::vector<std::string>& depends, const cmCustomCommandLines& commandLines, bool escapeOldStyle = true, const char* comment = nullptr, bool uses_terminal = false, - bool command_expand_lists = false); + bool command_expand_lists = false, const std::string& job_pool = ""); cmTarget* AddUtilityCommand( const std::string& utilityName, TargetOrigin origin, bool excludeFromAll, const char* workingDirectory, const std::vector<std::string>& byproducts, const std::vector<std::string>& depends, const cmCustomCommandLines& commandLines, bool escapeOldStyle = true, const char* comment = nullptr, bool uses_terminal = false, - bool command_expand_lists = false); + bool command_expand_lists = false, const std::string& job_pool = ""); /** * Add a subdirectory to the build. @@ -257,7 +257,7 @@ public: * can be used in CMake to refer to lists, directories, etc. */ void AddDefinition(const std::string& name, const char* value); - ///! Add a definition to this makefile and the global cmake cache. + //! Add a definition to this makefile and the global cmake cache. void AddCacheDefinition(const std::string& name, const char* value, const char* doc, cmStateEnums::CacheEntryType type, bool force = false); @@ -272,7 +272,7 @@ public: * for cache entries, and will only affect the current makefile. */ void RemoveDefinition(const std::string& name); - ///! Remove a definition from the cache. + //! Remove a definition from the cache. void RemoveCacheDefinition(const std::string& name); /** @@ -313,6 +313,9 @@ public: PolicyPushPop(cmMakefile* m); ~PolicyPushPop(); + PolicyPushPop(const PolicyPushPop&) = delete; + PolicyPushPop& operator=(const PolicyPushPop&) = delete; + private: cmMakefile* Makefile; }; @@ -370,14 +373,13 @@ public: return this->ComplainFileRegularExpression.c_str(); } - /** - * Get the list of targets - */ - cmTargets& GetTargets() { return this->Targets; } - /** - * Get the list of targets, const version - */ - const cmTargets& GetTargets() const { return this->Targets; } + // -- List of targets + typedef std::unordered_map<std::string, cmTarget> cmTargetMap; + /** Get the target map */ + cmTargetMap& GetTargets() { return this->Targets; } + /** Get the target map - const version */ + cmTargetMap const& GetTargets() const { return this->Targets; } + const std::vector<cmTarget*>& GetOwnedImportedTargets() const { return this->ImportedTargetsOwned; @@ -436,7 +438,7 @@ public: const char* GetDefinition(const std::string&) const; const std::string* GetDef(const std::string&) const; const std::string& GetSafeDefinition(const std::string&) const; - std::string GetRequiredDefinition(const std::string& name) const; + const std::string& GetRequiredDefinition(const std::string& name) const; bool IsDefinitionSet(const std::string&) const; /** * Get the list of all variables in the current space. If argument @@ -545,7 +547,7 @@ public: { return this->ListFiles; } - ///! When the file changes cmake will be re-run from the build system. + //! When the file changes cmake will be re-run from the build system. void AddCMakeDependFile(const std::string& file) { this->ListFiles.push_back(file); @@ -607,8 +609,8 @@ public: /** * Copy file but change lines according to ConfigureString */ - int ConfigureFile(const char* infile, const char* outfile, bool copyonly, - bool atOnly, bool escapeQuotes, + int ConfigureFile(const std::string& infile, const std::string& outfile, + bool copyonly, bool atOnly, bool escapeQuotes, cmNewLineStyle = cmNewLineStyle()); /** @@ -623,7 +625,7 @@ public: bool ExecuteCommand(const cmListFileFunction& lff, cmExecutionStatus& status); - ///! Enable support for named language, if nil then all languages are + //! Enable support for named language, if nil then all languages are /// enabled. void EnableLanguage(std::vector<std::string> const& languages, bool optional); @@ -638,8 +640,8 @@ public: cmVariableWatch* GetVariableWatch() const; #endif - ///! Display progress or status message. - void DisplayStatus(const char*, float) const; + //! Display progress or status message. + void DisplayStatus(const std::string&, float) const; /** * Expand the given list file arguments into the full set after @@ -674,7 +676,7 @@ public: */ cmSourceFile* GetSourceFileWithOutput(const std::string& outName) const; - ///! Add a new cmTest to the list of tests for this makefile. + //! Add a new cmTest to the list of tests for this makefile. cmTest* CreateTest(const std::string& testName); /** Get a cmTest pointer for a given test name, if the name is @@ -698,7 +700,7 @@ public: std::string GetModulesFile(const std::string& name, bool& system) const; - ///! Set/Get a property of this directory + //! Set/Get a property of this directory void SetProperty(const std::string& prop, const char* value); void AppendProperty(const std::string& prop, const char* value, bool asString = false); @@ -707,7 +709,7 @@ public: bool GetPropertyAsBool(const std::string& prop) const; std::vector<std::string> GetPropertyKeys() const; - ///! Initialize a makefile from its parent + //! Initialize a makefile from its parent void InitializeFromParent(cmMakefile* parent); void AddInstallGenerator(cmInstallGenerator* g) @@ -743,6 +745,9 @@ public: cmPolicies::PolicyMap const& pm); ~FunctionPushPop(); + FunctionPushPop(const FunctionPushPop&) = delete; + FunctionPushPop& operator=(const FunctionPushPop&) = delete; + void Quiet() { this->ReportError = false; } private: @@ -757,6 +762,9 @@ public: cmPolicies::PolicyMap const& pm); ~MacroPushPop(); + MacroPushPop(const MacroPushPop&) = delete; + MacroPushPop& operator=(const MacroPushPop&) = delete; + void Quiet() { this->ReportError = false; } private: @@ -887,7 +895,7 @@ protected: mutable std::set<cmListFileContext> CMP0054ReportedIds; // libraries, classes, and executables - mutable cmTargets Targets; + mutable cmTargetMap Targets; std::map<std::string, std::string> AliasTargets; typedef std::vector<cmSourceFile*> SourceFileVec; |