[Cmake-commits] CMake branch, next, updated. v2.8.6-1795-g1c4a0f0

David Cole david.cole at kitware.com
Fri Nov 4 13:40:53 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  1c4a0f06fb1aa1e2432ec541295b8b10c23aea22 (commit)
       via  011694c269a1193ec8f7fe8dce8d4a86bcafa8e4 (commit)
      from  8505e682ed32155595e2ed4a039dcd97c49ec85b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c4a0f06fb1aa1e2432ec541295b8b10c23aea22
commit 1c4a0f06fb1aa1e2432ec541295b8b10c23aea22
Merge: 8505e68 011694c
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Fri Nov 4 13:40:51 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 4 13:40:51 2011 -0400

    Merge topic 'fix-11213-vs10-mfc-support' into next
    
    011694c VS10: Use expected values for UseOfMfc (#11213)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=011694c269a1193ec8f7fe8dce8d4a86bcafa8e4
commit 011694c269a1193ec8f7fe8dce8d4a86bcafa8e4
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Fri Nov 4 13:29:41 2011 -0400
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Fri Nov 4 13:29:41 2011 -0400

    VS10: Use expected values for UseOfMfc (#11213)
    
    Use expected values for the UseOfMfc xml element in
    VS 10 .vcxproj files.
    
      CMAKE_MFC_FLAG=1 maps to "Static"
      CMAKE_MFC_FLAG=2 maps to "Dynamic"
      all other values map to "false"
    
    Thanks to Randy Schott and McBen for their patches which
    served as inspiration and motivation for getting this done.
    
    See also http://public.kitware.com/Bug/view.php?id=11224

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 551b0ad..c51254a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -290,16 +290,24 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
       }
     configType += "</ConfigurationType>\n";
     this->WriteString(configType.c_str(), 2); 
+
     const char* mfcFlag = 
       this->Target->GetMakefile()->GetDefinition("CMAKE_MFC_FLAG");
-    if(mfcFlag)
+    std::string mfcFlagValue = mfcFlag ? mfcFlag : "0";
+
+    std::string useOfMfcValue = "false";
+    if(mfcFlagValue == "1")
       {
-      this->WriteString("<UseOfMfc>true</UseOfMfc>\n", 2);
+      useOfMfcValue = "Static";
       }
-    else
+    else if(mfcFlagValue == "2")
       {
-      this->WriteString("<UseOfMfc>false</UseOfMfc>\n", 2);
+      useOfMfcValue = "Dynamic";
       }
+    std::string mfcLine = "<UseOfMfc>";
+    mfcLine += useOfMfcValue + "</UseOfMfc>\n";
+    this->WriteString(mfcLine.c_str(), 2);
+
     if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY &&
        this->ClOptions[*i]->UsingUnicode())
       {

-----------------------------------------------------------------------

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list