summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h56
1 files changed, 20 insertions, 36 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index dd9097a..1f035a1 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -10,8 +10,9 @@
#include "cmListFileCache.h"
#include "cmPolicies.h"
#include "cmPropertyMap.h"
-#include "cmState.h"
+#include "cmStateTypes.h"
#include "cmTargetLinkLibraryType.h"
+#include "cm_unordered_map.hxx"
#include <iosfwd>
#include <map>
@@ -20,16 +21,9 @@
#include <utility>
#include <vector>
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-#ifdef CMake_HAVE_CXX_UNORDERED_MAP
-#include <unordered_map>
-#else
-#include <cmsys/hash_map.hxx>
-#endif
-#endif
-
class cmMakefile;
class cmSourceFile;
+class cmGlobalGenerator;
class cmTargetInternals;
class cmTargetInternalPointer
@@ -61,8 +55,8 @@ public:
VisibilityImportedGlobally
};
- cmTarget(std::string const& name, cmState::TargetType type, Visibility vis,
- cmMakefile* mf);
+ cmTarget(std::string const& name, cmStateEnums::TargetType type,
+ Visibility vis, cmMakefile* mf);
enum CustomCommandType
{
@@ -74,7 +68,9 @@ public:
/**
* Return the type of target.
*/
- cmState::TargetType GetType() const { return this->TargetTypeValue; }
+ cmStateEnums::TargetType GetType() const { return this->TargetTypeValue; }
+
+ cmGlobalGenerator* GetGlobalGenerator() const;
///! Set/Get the name of the target
const std::string& GetName() const { return this->Name; }
@@ -142,8 +138,8 @@ public:
*/
void ClearDependencyInformation(cmMakefile& mf, const std::string& target);
- void AddLinkLibrary(cmMakefile& mf, const std::string& target,
- const std::string& lib, cmTargetLinkLibraryType llt);
+ void AddLinkLibrary(cmMakefile& mf, const std::string& lib,
+ cmTargetLinkLibraryType llt);
enum TLLSignature
{
KeywordTLLSignature,
@@ -153,9 +149,6 @@ public:
cmListFileContext const& lfc);
void GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const;
- void MergeLinkLibraries(cmMakefile& mf, const std::string& selfname,
- const LinkLibraryVectorType& libs);
-
const std::vector<std::string>& GetLinkDirectories() const;
void AddLinkDirectory(const std::string& d);
@@ -200,9 +193,11 @@ public:
void AppendProperty(const std::string& prop, const char* value,
bool asString = false);
const char* GetProperty(const std::string& prop) const;
- const char* GetProperty(const std::string& prop, cmMakefile* context) const;
bool GetPropertyAsBool(const std::string& prop) const;
void CheckProperty(const std::string& prop, cmMakefile* context) const;
+ const char* GetComputedProperty(const std::string& prop,
+ cmMessenger* messenger,
+ cmListFileBacktrace const& context) const;
bool IsImported() const { return this->IsImportedTarget; }
bool IsImportedGloballyVisible() const
@@ -211,7 +206,7 @@ public:
}
// Get the properties
- cmPropertyMap& GetProperties() const { return this->Properties; }
+ cmPropertyMap const& GetProperties() const { return this->Properties; }
bool GetMappedConfig(std::string const& desired_config, const char** loc,
const char** imp, std::string& suffix) const;
@@ -270,9 +265,10 @@ public:
bool operator()(cmTarget const* t1, cmTarget const* t2) const;
};
-private:
- bool HandleLocationPropertyPolicy(cmMakefile* context) const;
+ std::string ImportedGetFullPath(const std::string& config,
+ bool implib) const;
+private:
const char* GetSuffixVariableInternal(bool implib) const;
const char* GetPrefixVariableInternal(bool implib) const;
@@ -281,11 +277,8 @@ private:
void SetPropertyDefault(const std::string& property,
const char* default_value);
- std::string ImportedGetFullPath(const std::string& config,
- bool implib) const;
-
private:
- mutable cmPropertyMap Properties;
+ cmPropertyMap Properties;
std::set<std::string> SystemIncludeDirectories;
std::set<std::string> LinkDirectoriesEmmitted;
std::set<std::string> Utilities;
@@ -299,11 +292,10 @@ private:
std::vector<cmCustomCommand> PreLinkCommands;
std::vector<cmCustomCommand> PostBuildCommands;
std::vector<std::pair<TLLSignature, cmListFileContext> > TLLCommands;
- LinkLibraryVectorType PrevLinkedLibraries;
LinkLibraryVectorType OriginalLinkLibraries;
cmMakefile* Makefile;
cmTargetInternalPointer Internal;
- cmState::TargetType TargetTypeValue;
+ cmStateEnums::TargetType TargetTypeValue;
bool HaveInstallRule;
bool RecordDependencies;
bool DLLPlatform;
@@ -325,15 +317,7 @@ private:
cmListFileBacktrace Backtrace;
};
-#ifdef CMAKE_BUILD_WITH_CMAKE
-#ifdef CMake_HAVE_CXX_UNORDERED_MAP
-typedef std::unordered_map<std::string, cmTarget> cmTargets;
-#else
-typedef cmsys::hash_map<std::string, cmTarget> cmTargets;
-#endif
-#else
-typedef std::map<std::string, cmTarget> cmTargets;
-#endif
+typedef CM_UNORDERED_MAP<std::string, cmTarget> cmTargets;
class cmTargetSet : public std::set<std::string>
{