diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 6945b0d35..922cdb782 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -731,8 +731,7 @@ cmGlobalUnixMakefileGenerator3 makefileName = localName; makefileName += "/build.make"; - bool needRequiresStep = - this->NeedRequiresStep(lg,t->second.GetName()); + bool needRequiresStep = this->NeedRequiresStep(t->second); lg->WriteDivider(ruleFileStream); ruleFileStream @@ -1168,18 +1167,17 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule bool cmGlobalUnixMakefileGenerator3 -::NeedRequiresStep(cmLocalUnixMakefileGenerator3 *lg,const char *name) +::NeedRequiresStep(cmTarget const& target) { - std::map& - checkSet = lg->GetIntegrityCheckSet()[name]; - for(std::map::const_iterator - l = checkSet.begin(); l != checkSet.end(); ++l) + std::set languages; + target.GetLanguages(languages); + for(std::set::const_iterator l = languages.begin(); + l != languages.end(); ++l) { - std::string name2 = "CMAKE_NEEDS_REQUIRES_STEP_"; - name2 += l->first; - name2 += "_FLAG"; - if(lg->GetMakefile()->GetDefinition(name2.c_str())) + std::string var = "CMAKE_NEEDS_REQUIRES_STEP_"; + var += *l; + var += "_FLAG"; + if(target.GetMakefile()->GetDefinition(var.c_str())) { return true; } diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 512618ed6..56c499413 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -165,7 +165,7 @@ protected: cmTarget &target); // does this generator need a requires step for any of its targets - bool NeedRequiresStep(cmLocalUnixMakefileGenerator3 *lg, const char *); + bool NeedRequiresStep(cmTarget const&); // Setup target names virtual const char* GetAllTargetName() { return "all"; }