diff options
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r-- | Source/cmGlobalGenerator.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index bc6e17d..48fa704 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -278,6 +278,9 @@ public: std::set<std::string> const& GetDirectoryContent(std::string const& dir, bool needDisk = true); + void IndexTarget(cmTarget* t); + void IndexGeneratorTarget(cmGeneratorTarget* gt); + static bool IsReservedTarget(std::string const& name); virtual const char* GetAllTargetName() const { return "ALL_BUILD"; } @@ -420,7 +423,6 @@ protected: std::map<std::string, std::string> AliasTargets; cmTarget* FindTargetImpl(std::string const& name) const; - cmTarget* FindImportedTargetImpl(std::string const& name) const; cmGeneratorTarget* FindGeneratorTargetImpl(std::string const& name) const; cmGeneratorTarget* @@ -430,6 +432,26 @@ protected: virtual bool UseFolderProperty(); private: + +#if defined(CMAKE_BUILD_WITH_CMAKE) +# ifdef CMake_HAVE_CXX11_UNORDERED_MAP + typedef std::unordered_map<std::string, cmTarget*> TargetMap; + typedef std::unordered_map<std::string, cmGeneratorTarget*> + GeneratorTargetMap; +# else + typedef cmsys::hash_map<std::string, cmTarget*> TargetMap; + typedef cmsys::hash_map<std::string, cmGeneratorTarget*> GeneratorTargetMap; +# endif +#else + typedef std::map<std::string,cmTarget *> TargetMap; + typedef std::map<std::string,cmGeneratorTarget *> GeneratorTargetMap; +#endif + // Map efficiently from target name to cmTarget instance. + // Do not use this structure for looping over all targets. + // It contains both normal and globally visible imported targets. + TargetMap TargetSearchIndex; + GeneratorTargetMap GeneratorTargetSearchIndex; + cmMakefile* TryCompileOuterMakefile; // If you add a new map here, make sure it is copied // in EnableLanguagesFromGenerator |