summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2016-01-19 21:01:08 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2016-01-19 21:04:15 (GMT)
commita15e375cddb415ebe89aa5896d783b821aca940c (patch)
tree1b5806c7650b026ebde912096f45d0e47c3f76c6 /Source
parentc13ed964012bcdf3765ada195db66930d6a0fcf9 (diff)
downloadCMake-a15e375cddb415ebe89aa5896d783b821aca940c.zip
CMake-a15e375cddb415ebe89aa5896d783b821aca940c.tar.gz
CMake-a15e375cddb415ebe89aa5896d783b821aca940c.tar.bz2
Fix MFC setting on utility targets (#15867)
Multi-byte MFC is deprecated, and some projects will not compile if MFC is enabled.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 27ae685..09d4a90 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -762,13 +762,16 @@ void cmVisualStudio10TargetGenerator
std::string mfcFlagValue = mfcFlag ? mfcFlag : "0";
std::string useOfMfcValue = "false";
- if(mfcFlagValue == "1")
- {
- useOfMfcValue = "Static";
- }
- else if(mfcFlagValue == "2")
+ if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
{
- useOfMfcValue = "Dynamic";
+ if(mfcFlagValue == "1")
+ {
+ useOfMfcValue = "Static";
+ }
+ else if(mfcFlagValue == "2")
+ {
+ useOfMfcValue = "Dynamic";
+ }
}
std::string mfcLine = "<UseOfMfc>";
mfcLine += useOfMfcValue + "</UseOfMfc>\n";