summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-22 17:57:08 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-22 17:57:08 (GMT)
commit2e6063068c94d4045e699fed51e6d1e9af344bbf (patch)
treed11025f71134b3238e52655640dcdf2158425597 /Source/cmNinjaTargetGenerator.cxx
parent81739e9215ef10d870f14404b0ec5eb4bee16ce4 (diff)
parent3bb707f0a1408dc0381ecbf4ec934e9f14d8927c (diff)
downloadCMake-2e6063068c94d4045e699fed51e6d1e9af344bbf.zip
CMake-2e6063068c94d4045e699fed51e6d1e9af344bbf.tar.gz
CMake-2e6063068c94d4045e699fed51e6d1e9af344bbf.tar.bz2
Merge branch 'improve-variable-help-formatting' into revert-cmake-W-options
Resolve conflicts in Help/variable/CMAKE_ERROR_DEPRECATED.rst Help/variable/CMAKE_WARN_DEPRECATED.rst by integrating changes from both sides.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index addf292..81fdde2 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -58,7 +58,7 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
}
cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmGeneratorTarget* target)
- : cmCommonTargetGenerator(target),
+ : cmCommonTargetGenerator(cmOutputConverter::HOME_OUTPUT, target),
MacOSXContentGenerator(0),
OSXBundleGenerator(0),
MacContentFolders(),
@@ -195,7 +195,7 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
return cmNinjaDeps();
cmComputeLinkInformation* cli =
- this->Target->GetLinkInformation(this->GetConfigName());
+ this->GeneratorTarget->GetLinkInformation(this->GetConfigName());
if(!cli)
return cmNinjaDeps();
@@ -209,6 +209,15 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
result.push_back(this->ConvertToNinjaPath(this->ModuleDefinitionFile));
}
+ // Add user-specified dependencies.
+ if (const char* linkDepends = this->Target->GetProperty("LINK_DEPENDS"))
+ {
+ std::vector<std::string> linkDeps;
+ cmSystemTools::ExpandListArgument(linkDepends, linkDeps);
+ std::transform(linkDeps.begin(), linkDeps.end(),
+ std::back_inserter(result), MapToNinjaPath());
+ }
+
return result;
}
@@ -273,11 +282,12 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
{
pdbPath = this->Target->GetPDBDirectory(this->GetConfigName());
pdbPath += "/";
- pdbPath += this->Target->GetPDBName(this->GetConfigName());
+ pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName());
}
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
{
- compilePdbPath = this->Target->GetCompilePDBPath(this->GetConfigName());
+ compilePdbPath =
+ this->GeneratorTarget->GetCompilePDBPath(this->GetConfigName());
if(compilePdbPath.empty())
{
compilePdbPath = this->Target->GetSupportDirectory() + "/";
@@ -741,7 +751,7 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
cmSourceFile const& source, const char* pkgloc)
{
// Skip OS X content when not building a Framework or Bundle.
- if(!this->Generator->GetTarget()->IsBundleOnApple())
+ if(!this->Generator->GetGeneratorTarget()->IsBundleOnApple())
{
return;
}