diff options
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index e0eef6f..82f2715 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -31,11 +31,14 @@ #include <cmsys/auto_ptr.hxx> #include <cmsys/RegularExpression.hxx> #if defined(CMAKE_BUILD_WITH_CMAKE) -# include <cmsys/hash_map.hxx> +# ifdef CMake_HAVE_CXX11_UNORDERED_MAP +# include <unordered_map> +# else +# include <cmsys/hash_map.hxx> +# endif #endif #include <stack> -#include <deque> class cmFunctionBlocker; class cmCommand; @@ -387,33 +390,13 @@ public: */ cmPolicies *GetPolicies() const; - struct cmCMP0054Id - { - cmCMP0054Id(cmListFileContext const& context): - Context(context) - { - - } - - bool operator< (cmCMP0054Id const& id) const - { - if(this->Context.FilePath != id.Context.FilePath) - return this->Context.FilePath < id.Context.FilePath; - - return this->Context.Line < id.Context.Line; - } - - cmListFileContext Context; - }; - - mutable std::set<cmCMP0054Id> CMP0054ReportedIds; + mutable std::set<cmListFileContext> CMP0054ReportedIds; /** * Determine if the given context, name pair has already been reported * in context of CMP0054. */ - bool HasCMP0054AlreadyBeenReported( - cmListFileContext context) const; + bool HasCMP0054AlreadyBeenReported() const; bool IgnoreErrorsCMP0061() const; @@ -611,6 +594,7 @@ public: * Get the current context backtrace. */ cmListFileBacktrace GetBacktrace() const; + cmListFileContext GetExecutionContext() const; /** * Get the vector of files created by this makefile @@ -868,7 +852,11 @@ protected: // libraries, classes, and executables mutable cmTargets Targets; #if defined(CMAKE_BUILD_WITH_CMAKE) +#ifdef CMake_HAVE_CXX11_UNORDERED_MAP + typedef std::unordered_map<std::string, cmTarget*> TargetMap; +#else typedef cmsys::hash_map<std::string, cmTarget*> TargetMap; +#endif #else typedef std::map<std::string, cmTarget*> TargetMap; #endif @@ -963,7 +951,7 @@ private: bool CheckSystemVars; // stack of list files being read - std::deque<std::string> ListFileStack; + std::vector<std::string> ListFileStack; // stack of commands being invoked. struct CallStackEntry @@ -971,7 +959,7 @@ private: cmListFileContext const* Context; cmExecutionStatus* Status; }; - typedef std::deque<CallStackEntry> CallStackType; + typedef std::vector<CallStackEntry> CallStackType; CallStackType CallStack; friend class cmMakefileCall; @@ -1041,7 +1029,11 @@ private: // A map for fast output to input look up. #if defined(CMAKE_BUILD_WITH_CMAKE) +#ifdef CMake_HAVE_CXX11_UNORDERED_MAP + typedef std::unordered_map<std::string, cmSourceFile*> OutputToSourceMap; +#else typedef cmsys::hash_map<std::string, cmSourceFile*> OutputToSourceMap; +#endif #else typedef std::map<std::string, cmSourceFile*> OutputToSourceMap; #endif |