summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h70
1 files changed, 29 insertions, 41 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index dd9097a..1d40d20 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -5,14 +5,6 @@
#include <cmConfigure.h> // IWYU pragma: keep
-#include "cmAlgorithms.h"
-#include "cmCustomCommand.h"
-#include "cmListFileCache.h"
-#include "cmPolicies.h"
-#include "cmPropertyMap.h"
-#include "cmState.h"
-#include "cmTargetLinkLibraryType.h"
-
#include <iosfwd>
#include <map>
#include <set>
@@ -20,15 +12,18 @@
#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
+#include "cmAlgorithms.h"
+#include "cmCustomCommand.h"
+#include "cmListFileCache.h"
+#include "cmPolicies.h"
+#include "cmPropertyMap.h"
+#include "cmStateTypes.h"
+#include "cmTargetLinkLibraryType.h"
+#include "cm_unordered_map.hxx"
+class cmGlobalGenerator;
class cmMakefile;
+class cmMessenger;
class cmSourceFile;
class cmTargetInternals;
@@ -61,8 +56,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 +69,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 +139,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 +150,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 +194,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 +207,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 +266,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 +278,11 @@ private:
void SetPropertyDefault(const std::string& property,
const char* default_value);
- std::string ImportedGetFullPath(const std::string& config,
- bool implib) const;
+ bool CheckImportedLibName(std::string const& prop,
+ std::string const& value) const;
private:
- mutable cmPropertyMap Properties;
+ cmPropertyMap Properties;
std::set<std::string> SystemIncludeDirectories;
std::set<std::string> LinkDirectoriesEmmitted;
std::set<std::string> Utilities;
@@ -299,11 +296,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 +321,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>
{