diff options
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c665b1f..d07b4e1 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -28,10 +28,10 @@ #include "cmSourceGroup.h" #endif +#include <cm_auto_ptr.hxx> #include <cmsys/RegularExpression.hxx> -#include <cmsys/auto_ptr.hxx> #if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX11_UNORDERED_MAP +#ifdef CMake_HAVE_CXX_UNORDERED_MAP #include <unordered_map> #else #include <cmsys/hash_map.hxx> @@ -97,7 +97,7 @@ public: * Remove the function blocker whose scope ends with the given command. * This returns ownership of the function blocker object. */ - cmsys::auto_ptr<cmFunctionBlocker> RemoveFunctionBlocker( + CM_AUTO_PTR<cmFunctionBlocker> RemoveFunctionBlocker( cmFunctionBlocker* fb, const cmListFileFunction& lff); /** @@ -182,24 +182,23 @@ public: * Add a utility to the build. A utiltity target is a command that * is run every time the target is built. */ - cmTarget* AddUtilityCommand(const std::string& utilityName, - bool excludeFromAll, - const std::vector<std::string>& depends, - const char* workingDirectory, - const char* command, const char* arg1 = 0, - const char* arg2 = 0, const char* arg3 = 0, - const char* arg4 = 0); + cmTarget* AddUtilityCommand( + const std::string& utilityName, bool excludeFromAll, + const std::vector<std::string>& depends, const char* workingDirectory, + const char* command, const char* arg1 = CM_NULLPTR, + const char* arg2 = CM_NULLPTR, const char* arg3 = CM_NULLPTR, + const char* arg4 = CM_NULLPTR); cmTarget* AddUtilityCommand( const std::string& utilityName, bool excludeFromAll, const char* workingDirectory, const std::vector<std::string>& depends, const cmCustomCommandLines& commandLines, bool escapeOldStyle = true, - const char* comment = 0, bool uses_terminal = false); + const char* comment = CM_NULLPTR, bool uses_terminal = false); cmTarget* AddUtilityCommand( const std::string& utilityName, 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 = 0, bool uses_terminal = false); + const char* comment = CM_NULLPTR, bool uses_terminal = false); /** * Add a link library to the build. @@ -274,14 +273,14 @@ public: /** * Add a root source group for consideration when adding a new source. */ - void AddSourceGroup(const std::string& name, const char* regex = 0); + void AddSourceGroup(const std::string& name, const char* regex = CM_NULLPTR); /** * Add a source group for consideration when adding a new source. * name is tokenized. */ void AddSourceGroup(const std::vector<std::string>& name, - const char* regex = 0); + const char* regex = CM_NULLPTR); #endif @@ -437,6 +436,9 @@ public: bool IsOn(const std::string& name) const; bool IsSet(const std::string& name) const; + /** Return whether the target platform is 32-bit. */ + bool PlatformIs32Bit() const; + /** Return whether the target platform is 64-bit. */ bool PlatformIs64Bit() const; @@ -516,8 +518,8 @@ public: const char* ExpandVariablesInString(std::string& source) const; const char* ExpandVariablesInString(std::string& source, bool escapeQuotes, bool noEscapes, bool atOnly = false, - const char* filename = 0, long line = -1, - bool removeEmpty = false, + const char* filename = CM_NULLPTR, + long line = -1, bool removeEmpty = false, bool replaceAt = false) const; /** @@ -589,11 +591,11 @@ public: */ bool ExpandArguments(std::vector<cmListFileArgument> const& inArgs, std::vector<std::string>& outArgs, - const char* filename = 0) const; + const char* filename = CM_NULLPTR) const; bool ExpandArguments(std::vector<cmListFileArgument> const& inArgs, std::vector<cmExpandedCommandArgument>& outArgs, - const char* filename = 0) const; + const char* filename = CM_NULLPTR) const; /** * Get the instance @@ -643,8 +645,9 @@ public: void AddInstallGenerator(cmInstallGenerator* g) { - if (g) + if (g) { this->InstallGenerators.push_back(g); + } } std::vector<cmInstallGenerator*>& GetInstallGenerators() { @@ -653,8 +656,9 @@ public: void AddTestGenerator(cmTestGenerator* g) { - if (g) + if (g) { this->TestGenerators.push_back(g); + } } const std::vector<cmTestGenerator*>& GetTestGenerators() const { @@ -715,8 +719,7 @@ public: cmMakefile* Makefile; }; - void IssueMessage(cmake::MessageType t, std::string const& text, - bool force = false) const; + void IssueMessage(cmake::MessageType t, std::string const& text) const; /** Set whether or not to report a CMP0000 violation. */ void SetCheckCMP0000(bool b) { this->CheckCMP0000 = b; } @@ -739,7 +742,7 @@ public: bool PolicyOptionalWarningEnabled(std::string const& var); bool AddRequiredTargetFeature(cmTarget* target, const std::string& feature, - std::string* error = 0) const; + std::string* error = CM_NULLPTR) const; bool CompileFeatureKnown(cmTarget const* target, const std::string& feature, std::string& lang, std::string* error) const; @@ -768,11 +771,10 @@ public: void EnforceDirectoryLevelRules() const; - void AddEvaluationFile( - const std::string& inputFile, - cmsys::auto_ptr<cmCompiledGeneratorExpression> outputName, - cmsys::auto_ptr<cmCompiledGeneratorExpression> condition, - bool inputIsContent); + void AddEvaluationFile(const std::string& inputFile, + CM_AUTO_PTR<cmCompiledGeneratorExpression> outputName, + CM_AUTO_PTR<cmCompiledGeneratorExpression> condition, + bool inputIsContent); std::vector<cmGeneratorExpressionEvaluationFile*> GetEvaluationFiles() const; std::vector<cmExportBuildFileGenerator*> GetExportBuildFileGenerators() @@ -792,7 +794,7 @@ protected: // libraries, classes, and executables mutable cmTargets Targets; #if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX11_UNORDERED_MAP +#ifdef CMake_HAVE_CXX_UNORDERED_MAP typedef std::unordered_map<std::string, cmTarget*> TargetMap; #else typedef cmsys::hash_map<std::string, cmTarget*> TargetMap; @@ -911,7 +913,7 @@ private: // A map for fast output to input look up. #if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX11_UNORDERED_MAP +#ifdef CMake_HAVE_CXX_UNORDERED_MAP typedef std::unordered_map<std::string, cmSourceFile*> OutputToSourceMap; #else typedef cmsys::hash_map<std::string, cmSourceFile*> OutputToSourceMap; @@ -928,11 +930,12 @@ private: std::vector<cmSourceFile*> QtUiFilesWithOptions; - bool AddRequiredTargetCFeature(cmTarget* target, - const std::string& feature) const; + bool AddRequiredTargetCFeature(cmTarget* target, const std::string& feature, + std::string* error = CM_NULLPTR) const; bool AddRequiredTargetCxxFeature(cmTarget* target, - const std::string& feature) const; + const std::string& feature, + std::string* error = CM_NULLPTR) const; void CheckNeededCLanguage(const std::string& feature, bool& needC90, bool& needC99, bool& needC11) const; |