summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-17 14:59:49 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-02-17 14:59:49 (GMT)
commit10623032c7883c2e21f28d856d46185996dd5d02 (patch)
tree1dc9c6e6114730e13f2d4329ca8c9cb33656a92c
parent2bbcbb4ee580ada478f075f2b0989ded91d79d6b (diff)
parent9db9c1fc8b3314b70a243250ea2879c5a0e82799 (diff)
downloadCMake-10623032c7883c2e21f28d856d46185996dd5d02.zip
CMake-10623032c7883c2e21f28d856d46185996dd5d02.tar.gz
CMake-10623032c7883c2e21f28d856d46185996dd5d02.tar.bz2
Merge topic 'INTERFACE-no-sources'
9db9c1fc cmTarget: Don't try to get sources of an INTERFACE_LIBRARY.
-rw-r--r--Source/cmGeneratorTarget.cxx11
-rw-r--r--Source/cmGlobalGenerator.cxx3
-rw-r--r--Source/cmTarget.cxx1
3 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 2573c85..175bb0e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -498,11 +498,14 @@ cmTargetTraceDependencies
// Queue all the source files already specified for the target.
std::vector<cmSourceFile*> sources;
- this->Target->GetSourceFiles(sources);
- for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
- si != sources.end(); ++si)
+ if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
{
- this->QueueSource(*si);
+ this->Target->GetSourceFiles(sources);
+ for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
+ si != sources.end(); ++si)
+ {
+ this->QueueSource(*si);
+ }
}
// Queue pre-build, pre-link, and post-build rule dependencies.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a61cab1..0c44681 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1468,7 +1468,8 @@ void cmGlobalGenerator::ComputeGeneratorTargetObjects()
for(cmGeneratorTargetsType::iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
- if (ti->second->Target->IsImported())
+ if (ti->second->Target->IsImported()
+ || ti->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3e96b69..db34bd8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -551,6 +551,7 @@ bool cmTarget::FindSourceFiles()
//----------------------------------------------------------------------------
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
{
+ assert(this->GetType() != INTERFACE_LIBRARY);
files = this->SourceFiles;
}