diff options
author | Brad King <brad.king@kitware.com> | 2017-05-23 18:17:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-23 18:17:16 (GMT) |
commit | ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb (patch) | |
tree | e861bdc1ec05e09f8f2fe1ab5e0113866098019b /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 150d9daf89ab8148bdf90213ecf1cc90c2425d75 (diff) | |
parent | b520b18c733c8ed6036fe6488c27e1ee2630fd97 (diff) | |
download | CMake-ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb.zip CMake-ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb.tar.gz CMake-ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb.tar.bz2 |
Merge topic 'vs-reduce-UseOfMfc'
b520b18c VS: Write UseOfMfc tag only if CMAKE_MFC_FLAG is present
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !873
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4fcf5dc..eef6f37 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -982,19 +982,21 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( const char* mfcFlag = this->GeneratorTarget->Target->GetMakefile()->GetDefinition( "CMAKE_MFC_FLAG"); - std::string mfcFlagValue = mfcFlag ? mfcFlag : "0"; + if (mfcFlag) { + std::string const mfcFlagValue = mfcFlag; - std::string useOfMfcValue = "false"; - if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { - if (mfcFlagValue == "1") { - useOfMfcValue = "Static"; - } else if (mfcFlagValue == "2") { - useOfMfcValue = "Dynamic"; + std::string useOfMfcValue = "false"; + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { + if (mfcFlagValue == "1") { + useOfMfcValue = "Static"; + } else if (mfcFlagValue == "2") { + useOfMfcValue = "Dynamic"; + } } + std::string mfcLine = "<UseOfMfc>"; + mfcLine += useOfMfcValue + "</UseOfMfc>\n"; + this->WriteString(mfcLine.c_str(), 2); } - std::string mfcLine = "<UseOfMfc>"; - mfcLine += useOfMfcValue + "</UseOfMfc>\n"; - this->WriteString(mfcLine.c_str(), 2); if ((this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY && this->ClOptions[config]->UsingUnicode()) || |