summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-14 11:37:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-14 11:37:16 (GMT)
commit208ac575312717223bfc61f57072ff61db790b86 (patch)
treec5d4da6f9456acade8acffeb8f37464562b57ad4
parentfda9a94fe6061908e1d66c111f9030baa62cccf7 (diff)
parent64e973e991636f296cb2bf4f3c0e4ec26463a7b1 (diff)
downloadCMake-208ac575312717223bfc61f57072ff61db790b86.zip
CMake-208ac575312717223bfc61f57072ff61db790b86.tar.gz
CMake-208ac575312717223bfc61f57072ff61db790b86.tar.bz2
Merge topic 'vs-fix-config-map'
64e973e9 Merge branch 'backport-vs-fix-config-map' into vs-fix-config-map c5b5bb27 VS: Do not consider MAP_IMPORTED_CONFIG_<CONFIG> on non-imported targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1256
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx14
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx14
2 files changed, 20 insertions, 8 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 624f9e5..3b45c90 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -200,10 +200,16 @@ void cmGlobalVisualStudio71Generator::WriteProjectConfigurations(
std::string guid = this->GetGUID(name);
for (std::vector<std::string>::const_iterator i = configs.begin();
i != configs.end(); ++i) {
- const char* dstConfig = target.GetProperty("MAP_IMPORTED_CONFIG_" +
- cmSystemTools::UpperCase(*i));
- if (dstConfig == nullptr) {
- dstConfig = i->c_str();
+ std::vector<std::string> mapConfig;
+ const char* dstConfig = i->c_str();
+ if (target.GetProperty("EXTERNAL_MSPROJECT")) {
+ if (const char* m = target.GetProperty("MAP_IMPORTED_CONFIG_" +
+ cmSystemTools::UpperCase(*i))) {
+ cmSystemTools::ExpandListArgument(m, mapConfig);
+ if (!mapConfig.empty()) {
+ dstConfig = mapConfig[0].c_str();
+ }
+ }
}
fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << dstConfig
<< "|" << platformName << std::endl;
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 728ad2d..f56c78b 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -354,10 +354,16 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
std::string guid = this->GetGUID(name);
for (std::vector<std::string>::const_iterator i = configs.begin();
i != configs.end(); ++i) {
- const char* dstConfig = target.GetProperty("MAP_IMPORTED_CONFIG_" +
- cmSystemTools::UpperCase(*i));
- if (dstConfig == nullptr) {
- dstConfig = i->c_str();
+ std::vector<std::string> mapConfig;
+ const char* dstConfig = i->c_str();
+ if (target.GetProperty("EXTERNAL_MSPROJECT")) {
+ if (const char* m = target.GetProperty("MAP_IMPORTED_CONFIG_" +
+ cmSystemTools::UpperCase(*i))) {
+ cmSystemTools::ExpandListArgument(m, mapConfig);
+ if (!mapConfig.empty()) {
+ dstConfig = mapConfig[0].c_str();
+ }
+ }
}
fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
<< ".ActiveCfg = " << dstConfig << "|"