diff options
author | Brad King <brad.king@kitware.com> | 2017-07-17 15:42:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-07-17 15:42:18 (GMT) |
commit | b97878643bbd5952acfbd99e752d2302406dd90e (patch) | |
tree | d27afb210a617497498aecd452e3245a5fab4e2f /Source/cmGeneratorTarget.cxx | |
parent | f2b05a095ab2ab12d9d82daabdc31e46d36d4fcf (diff) | |
parent | d89e10cd58e5f9e21cbd466e56a1890e2811bee0 (diff) | |
download | CMake-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.cxx | 11 |
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; } |