mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 09:08:58 -05:00
cmTarget: Move member Utilities to impl
This commit is contained in:
+11
-5
@@ -168,6 +168,7 @@ public:
|
||||
cmStateEnums::TargetType TargetType;
|
||||
cmMakefile* Makefile;
|
||||
cmPropertyMap Properties;
|
||||
std::set<BT<std::string>> Utilities;
|
||||
std::set<std::string> SystemIncludeDirectories;
|
||||
std::vector<std::string> IncludeDirectoriesEntries;
|
||||
std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
|
||||
@@ -481,10 +482,15 @@ cmGlobalGenerator* cmTarget::GetGlobalGenerator() const
|
||||
return impl->Makefile->GetGlobalGenerator();
|
||||
}
|
||||
|
||||
void cmTarget::AddUtility(std::string const& u, cmMakefile* mf)
|
||||
void cmTarget::AddUtility(std::string const& name, cmMakefile* mf)
|
||||
{
|
||||
BT<std::string> util(u, mf ? mf->GetBacktrace() : cmListFileBacktrace());
|
||||
this->Utilities.insert(util);
|
||||
impl->Utilities.insert(
|
||||
BT<std::string>(name, mf ? mf->GetBacktrace() : cmListFileBacktrace()));
|
||||
}
|
||||
|
||||
std::set<BT<std::string>> const& cmTarget::GetUtilities() const
|
||||
{
|
||||
return impl->Utilities;
|
||||
}
|
||||
|
||||
cmListFileBacktrace const& cmTarget::GetBacktrace() const
|
||||
@@ -1461,12 +1467,12 @@ const char* cmTarget::GetProperty(const std::string& prop) const
|
||||
return output.c_str();
|
||||
}
|
||||
if (prop == propMANUALLY_ADDED_DEPENDENCIES) {
|
||||
if (this->Utilities.empty()) {
|
||||
if (impl->Utilities.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static std::string output;
|
||||
output = cmJoin(this->Utilities, ";");
|
||||
output = cmJoin(impl->Utilities, ";");
|
||||
return output.c_str();
|
||||
}
|
||||
if (prop == propIMPORTED) {
|
||||
|
||||
+4
-7
@@ -184,16 +184,14 @@ public:
|
||||
bool GetIsGeneratorProvided() const { return this->IsGeneratorProvided; }
|
||||
void SetIsGeneratorProvided(bool igp) { this->IsGeneratorProvided = igp; }
|
||||
|
||||
/** Add a utility on which this project depends. A utility is an executable
|
||||
/**
|
||||
* Add a utility on which this project depends. A utility is an executable
|
||||
* name as would be specified to the ADD_EXECUTABLE or UTILITY_SOURCE
|
||||
* commands. It is not a full path nor does it have an extension.
|
||||
*/
|
||||
void AddUtility(std::string const& u, cmMakefile* mf = nullptr);
|
||||
void AddUtility(std::string const& name, cmMakefile* mf = nullptr);
|
||||
///! Get the utilities used by this target
|
||||
std::set<BT<std::string>> const& GetUtilities() const
|
||||
{
|
||||
return this->Utilities;
|
||||
}
|
||||
std::set<BT<std::string>> const& GetUtilities() const;
|
||||
|
||||
///! Set/Get a property of this target file
|
||||
void SetProperty(const std::string& prop, const char* value);
|
||||
@@ -301,7 +299,6 @@ private:
|
||||
|
||||
private:
|
||||
bool IsGeneratorProvided;
|
||||
std::set<BT<std::string>> Utilities;
|
||||
cmPolicies::PolicyMap PolicyMap;
|
||||
std::string Name;
|
||||
std::string InstallPath;
|
||||
|
||||
Reference in New Issue
Block a user