diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3d8adae9ed..da57c4cbe3 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -723,7 +723,7 @@ void cmTarget::GetSourceFiles(std::vector &files, { assert(this->GetType() != INTERFACE_LIBRARY); - if (this->Makefile->GetGeneratorTargets().empty()) + if (!this->Makefile->IsConfigured()) { // At configure-time, this method can be called as part of getting the // LOCATION property or to export() a file to be include()d. However @@ -5249,7 +5249,7 @@ void cmTarget::GetLanguages(std::set& languages, std::vector objectLibraries; std::vector externalObjects; - if (this->Makefile->GetGeneratorTargets().empty()) + if (!this->Makefile->IsConfigured()) { this->GetObjectLibrariesCMP0026(objectLibraries); }