summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-22 23:01:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-27 06:44:20 (GMT)
commit736c2042c6bade0322441aafabababcbd92af52e (patch)
tree6d337a677712c800b7c2834d909c4736c1baa818 /Source
parentf210cb131e5814631d6d2974cf2437632446654f (diff)
downloadCMake-736c2042c6bade0322441aafabababcbd92af52e.zip
CMake-736c2042c6bade0322441aafabababcbd92af52e.tar.gz
CMake-736c2042c6bade0322441aafabababcbd92af52e.tar.bz2
cmGeneratorTarget: Add GetUtilities API
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx7
-rw-r--r--Source/cmGeneratorTarget.h1
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx4
7 files changed, 14 insertions, 8 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 7516576..7d5a9d0 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -796,7 +796,7 @@ std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
if(!this->UtilityItemsDone)
{
this->UtilityItemsDone = true;
- std::set<std::string> const& utilities = this->Target->GetUtilities();
+ std::set<std::string> const& utilities = this->GetUtilities();
for(std::set<std::string>::const_iterator i = utilities.begin();
i != utilities.end(); ++i)
{
@@ -1737,6 +1737,11 @@ const std::vector<std::string>&cmGeneratorTarget::GetLinkDirectories() const
return this->Target->GetLinkDirectories();
}
+const std::set<std::string>& cmGeneratorTarget::GetUtilities() const
+{
+ return this->Target->GetUtilities();
+}
+
//----------------------------------------------------------------------------
bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
{
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 38e1826..ff975c5 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -186,6 +186,7 @@ public:
const std::vector<std::string>& GetLinkDirectories() const;
+ std::set<std::string>const& GetUtilities() const;
/** Get the macro to define when building sources in this target.
If no macro should be defined null is returned. */
const char* GetExportMacro() const;
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 2671f4d..8498e39 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -965,7 +965,7 @@ cmGlobalNinjaGenerator
if (target->GetType() == cmState::GLOBAL_TARGET) {
// Global targets only depend on other utilities, which may not appear in
// the TargetDepends set (e.g. "all").
- std::set<std::string> const& utils = target->Target->GetUtilities();
+ std::set<std::string> const& utils = target->GetUtilities();
std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
} else {
cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target);
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index bb494f1..5866c0e 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -235,7 +235,7 @@ void cmGlobalVisualStudio6Generator
std::string project = target->GetName();
std::string location = expath;
this->WriteExternalProject(fout, project.c_str(),
- location.c_str(), target->Target->GetUtilities());
+ location.c_str(), target->GetUtilities());
}
else
{
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 5473247..340a0f7 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -459,7 +459,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
project.c_str(),
location.c_str(),
target->GetProperty("VS_PROJECT_TYPE"),
- target->Target->GetUtilities());
+ target->GetUtilities());
written = true;
}
else
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index bdb1b25..b771f11 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -464,8 +464,8 @@ bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies(
{
// Look for utility dependencies that magically link.
for(std::set<std::string>::const_iterator ui =
- target->Target->GetUtilities().begin();
- ui != target->Target->GetUtilities().end(); ++ui)
+ target->GetUtilities().begin();
+ ui != target->GetUtilities().end(); ++ui)
{
if(cmGeneratorTarget* depTarget =
target->GetLocalGenerator()->FindGeneratorTargetToUse(ui->c_str()))
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 541257b..9bb2765 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1778,8 +1778,8 @@ void cmLocalUnixMakefileGenerator3
{
text = "Running external command ...";
}
- depends.insert(depends.end(), (*glIt)->Target->GetUtilities().begin(),
- (*glIt)->Target->GetUtilities().end());
+ depends.insert(depends.end(), (*glIt)->GetUtilities().begin(),
+ (*glIt)->GetUtilities().end());
this->AppendEcho(commands, text,
cmLocalUnixMakefileGenerator3::EchoGlobal);