diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 31b80c76d..c5466a6ef 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3324,6 +3324,15 @@ void cmake::ReportUndefinedPropertyAccesses(const char *filename) std::vector enLangs; this->GlobalGenerator->GetEnabledLanguages(enLangs); + // Common configuration names. + // TODO: Compute current configuration(s). + std::vector enConfigs; + enConfigs.push_back(""); + enConfigs.push_back("DEBUG"); + enConfigs.push_back("RELEASE"); + enConfigs.push_back("MINSIZEREL"); + enConfigs.push_back("RELWITHDEBINFO"); + // take all the defined properties and add definitions for all the enabled // languages std::set > aliasedProperties; @@ -3334,7 +3343,20 @@ void cmake::ReportUndefinedPropertyAccesses(const char *filename) cmPropertyDefinitionMap::iterator j; for (j = i->second.begin(); j != i->second.end(); ++j) { - if (j->first.find("")) + // TODO: What if both and appear? + if (j->first.find("") != std::string::npos) + { + std::vector::const_iterator k; + for (k = enConfigs.begin(); k != enConfigs.end(); ++k) + { + std::string tmp = j->first; + cmSystemTools::ReplaceString(tmp, "", k->c_str()); + // add alias + aliasedProperties.insert + (std::pair(tmp,i->first)); + } + } + if (j->first.find("") != std::string::npos) { std::vector::const_iterator k; for (k = enLangs.begin(); k != enLangs.end(); ++k)