diff options
author | Brad King <brad.king@kitware.com> | 2016-09-29 12:09:36 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-29 12:09:36 (GMT) |
commit | 7cea3479d647ecf1957a4ed1f127a25197ac519e (patch) | |
tree | da041eda10c30960d96d579b86a8b487bb753057 /Source | |
parent | 4f719f23041cef87003b03e5fe722da06091f07f (diff) | |
parent | 9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851 (diff) | |
download | CMake-7cea3479d647ecf1957a4ed1f127a25197ac519e.zip CMake-7cea3479d647ecf1957a4ed1f127a25197ac519e.tar.gz CMake-7cea3479d647ecf1957a4ed1f127a25197ac519e.tar.bz2 |
Merge topic 'fix-explicit-RC'
9c5238df project: Fix support for explicit RC language
40c04821 Tests: Decide earlier whether to test resources
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 48e6c61..df993ce 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3142,7 +3142,26 @@ void cmMakefile::EnableLanguage(std::vector<std::string> const& lang, { this->AddDefinition("CMAKE_CFG_INTDIR", this->GetGlobalGenerator()->GetCMakeCFGIntDir()); - this->GetGlobalGenerator()->EnableLanguage(lang, this, optional); + // If RC is explicitly listed we need to do it after other languages. + // On some platforms we enable RC implicitly while enabling others. + // Do not let that look like recursive enable_language(RC). + std::vector<std::string> langs; + std::vector<std::string> langsRC; + langs.reserve(lang.size()); + for (std::vector<std::string>::const_iterator i = lang.begin(); + i != lang.end(); ++i) { + if (i->compare("RC") == 0) { + langsRC.push_back(*i); + } else { + langs.push_back(*i); + } + } + if (!langs.empty()) { + this->GetGlobalGenerator()->EnableLanguage(langs, this, optional); + } + if (!langsRC.empty()) { + this->GetGlobalGenerator()->EnableLanguage(langsRC, this, optional); + } } int cmMakefile::TryCompile(const std::string& srcdir, |