diff options
author | Brad King <brad.king@kitware.com> | 2007-08-02 17:38:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-08-02 17:38:39 (GMT) |
commit | 9f2de08f909350da3ebc14f124051a59ed1947c3 (patch) | |
tree | d773eed9e9015e94b2ecf74ac6fb8aef2b1c9381 /Source/cmMakefileTargetGenerator.cxx | |
parent | dac7814841a09d80b75eba37ac50aa9ae17ced19 (diff) | |
download | CMake-9f2de08f909350da3ebc14f124051a59ed1947c3.zip CMake-9f2de08f909350da3ebc14f124051a59ed1947c3.tar.gz CMake-9f2de08f909350da3ebc14f124051a59ed1947c3.tar.bz2 |
ENH: Added cmTarget::GetLanguages method to centralize computation of the list of languages compiled in a target.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 3a990fe..2eedfbb 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -234,14 +234,12 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() void cmMakefileTargetGenerator::WriteTargetLanguageFlags() { // write language flags for target - std::map<cmStdString,cmLocalUnixMakefileGenerator3::IntegrityCheckSet>& - checkSet = - this->LocalGenerator->GetIntegrityCheckSet()[this->Target->GetName()]; - for(std::map<cmStdString, - cmLocalUnixMakefileGenerator3::IntegrityCheckSet>::const_iterator - l = checkSet.begin(); l != checkSet.end(); ++l) + std::set<cmStdString> languages; + this->Target->GetLanguages(languages); + for(std::set<cmStdString>::const_iterator l = languages.begin(); + l != languages.end(); ++l) { - const char *lang = l->first.c_str(); + const char *lang = l->c_str(); std::string flags; bool shared = ((this->Target->GetType() == cmTarget::SHARED_LIBRARY) || (this->Target->GetType() == cmTarget::MODULE_LIBRARY)); |