summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-17 15:42:18 (GMT)
committerBrad King <brad.king@kitware.com>2017-07-17 15:42:18 (GMT)
commitb97878643bbd5952acfbd99e752d2302406dd90e (patch)
treed27afb210a617497498aecd452e3245a5fab4e2f /Source/cmGeneratorTarget.cxx
parentf2b05a095ab2ab12d9d82daabdc31e46d36d4fcf (diff)
parentd89e10cd58e5f9e21cbd466e56a1890e2811bee0 (diff)
downloadCMake-b97878643bbd5952acfbd99e752d2302406dd90e.zip
CMake-b97878643bbd5952acfbd99e752d2302406dd90e.tar.gz
CMake-b97878643bbd5952acfbd99e752d2302406dd90e.tar.bz2
Merge branch 'objlib-own-target-objs' into release-3.9
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 1802da4..329c7a9 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1025,12 +1025,23 @@ cmGeneratorTarget::KindedSources const& cmGeneratorTarget::GetKindedSources(
std::string const key = cmSystemTools::UpperCase(config);
KindedSourcesMapType::iterator it = this->KindedSourcesMap.find(key);
if (it != this->KindedSourcesMap.end()) {
+ if (!it->second.Initialized) {
+ std::ostringstream e;
+ e << "The SOURCES of \"" << this->GetName()
+ << "\" use a generator expression that depends on the "
+ "SOURCES themselves.";
+ this->GlobalGenerator->GetCMakeInstance()->IssueMessage(
+ cmake::FATAL_ERROR, e.str(), this->GetBacktrace());
+ static KindedSources empty;
+ return empty;
+ }
return it->second;
}
// Add an entry to the map for this configuration.
KindedSources& files = this->KindedSourcesMap[key];
this->ComputeKindedSources(files, config);
+ files.Initialized = true;
return files;
}