[Cmake-commits] CMake branch, master, updated. v3.8.1-1273-gae5f98a

Kitware Robot kwrobot at kitware.com
Tue May 23 14:25:02 EDT 2017


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, master has been updated
       via  ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb (commit)
       via  b520b18c733c8ed6036fe6488c27e1ee2630fd97 (commit)
      from  150d9daf89ab8148bdf90213ecf1cc90c2425d75 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb
commit ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb
Merge: 150d9da b520b18
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue May 23 18:17:11 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue May 23 14:17:16 2017 -0400

    Merge topic 'vs-reduce-UseOfMfc'
    
    b520b18c VS: Write UseOfMfc tag only if CMAKE_MFC_FLAG is present
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !873


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b520b18c733c8ed6036fe6488c27e1ee2630fd97
commit b520b18c733c8ed6036fe6488c27e1ee2630fd97
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon May 22 13:16:15 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon May 22 13:17:47 2017 -0400

    VS: Write UseOfMfc tag only if CMAKE_MFC_FLAG is present
    
    Don't bother writing `UseOfMfc` to `.vcxproj` files when the value is
    just the default of `0`.  This keeps the files cleaner.
    
    Patch-by: vvs31415 on gitlab.kitware.com

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()) ||

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

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list