[Cmake-commits] CMake branch, next, updated. v3.0.1-4999-ge7ddfa0

Brad King brad.king at kitware.com
Thu Aug 21 09:25:29 EDT 2014


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  e7ddfa0a3c874b315260c8f6331f708747a292f3 (commit)
       via  cbd1d42b34bf83ca24de1b98c5963a2941206300 (commit)
       via  0f8522a6c9c00afc67c367de1e1c3f601f1996e9 (commit)
       via  a43f44000d12c1357eeed04e5a02d11236730dfa (commit)
      from  0eba687083e606cf8a0b1f7127263f0996f59152 (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=e7ddfa0a3c874b315260c8f6331f708747a292f3
commit e7ddfa0a3c874b315260c8f6331f708747a292f3
Merge: 0eba687 cbd1d42
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 21 09:25:28 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 21 09:25:28 2014 -0400

    Merge topic 'vs-masm' into next
    
    cbd1d42b Help: Add notes for topic 'vs-masm'
    0f8522a6 VS: Add MASM support to VS 8 and 9 (#8170, #14984)
    a43f4400 VS: Move internal MasmEnabled member up to VS 7 generator


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbd1d42b34bf83ca24de1b98c5963a2941206300
commit cbd1d42b34bf83ca24de1b98c5963a2941206300
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 20 14:58:47 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 20 14:58:47 2014 -0400

    Help: Add notes for topic 'vs-masm'

diff --git a/Help/release/dev/vs-masm.rst b/Help/release/dev/vs-masm.rst
new file mode 100644
index 0000000..d7a19d0
--- /dev/null
+++ b/Help/release/dev/vs-masm.rst
@@ -0,0 +1,5 @@
+vs-masm
+-------
+
+* Visual Studio generators for VS 8 and later learned to support
+  the ``ASM_MASM`` language.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f8522a6c9c00afc67c367de1e1c3f601f1996e9
commit 0f8522a6c9c00afc67c367de1e1c3f601f1996e9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 7 15:20:49 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 20 10:22:07 2014 -0400

    VS: Add MASM support to VS 8 and 9 (#8170, #14984)

diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 29165f8..11a9627 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -44,6 +44,16 @@ private:
 
 extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[];
 
+static void cmConvertToWindowsSlash(std::string& s)
+{
+  std::string::size_type pos = 0;
+  while((pos = s.find('/', pos)) != std::string::npos)
+    {
+    s[pos] = '\\';
+    pos++;
+    }
+}
+
 //----------------------------------------------------------------------------
 cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator(VSVersion v):
   cmLocalVisualStudioGenerator(v)
@@ -862,6 +872,31 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
       }
     }
   fout << "/>\n";  // end of <Tool Name=VCCLCompilerTool
+  if(gg->IsMasmEnabled() && !this->FortranProject)
+    {
+    Options masmOptions(this, Options::MasmCompiler, 0, 0);
+    fout <<
+      "\t\t\t<Tool\n"
+      "\t\t\t\tName=\"MASM\"\n"
+      "\t\t\t\tIncludePaths=\""
+      ;
+    const char* sep = "";
+    for(i = includes.begin(); i != includes.end(); ++i)
+      {
+      std::string inc = *i;
+      cmConvertToWindowsSlash(inc);
+      fout << sep << this->EscapeForXML(inc);
+      sep = ";";
+      }
+    fout << "\"\n";
+    // Use same preprocessor definitions as VCCLCompilerTool.
+    targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n",
+                                                "ASM_MASM");
+    masmOptions.OutputFlagMap(fout, "\t\t\t\t");
+    fout <<
+      "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n"
+      "\t\t\t/>\n";
+    }
   tool = "VCCustomBuildTool";
   if(this->FortranProject)
     {
@@ -1700,6 +1735,7 @@ bool cmLocalVisualStudio7Generator
           {
           aCompilerTool = "VFFortranCompilerTool";
           }
+        std::string const& lang = (*sf)->GetLanguage();
         std::string ext = (*sf)->GetExtension();
         ext = cmSystemTools::LowerCase(ext);
         if(ext == "idl")
@@ -1727,6 +1763,11 @@ bool cmLocalVisualStudio7Generator
             aCompilerTool = "VFCustomBuildTool";
             }
           }
+        if (gg->IsMasmEnabled() && !this->FortranProject &&
+            lang == "ASM_MASM")
+          {
+          aCompilerTool = "MASM";
+          }
         for(std::map<std::string, cmLVS7GFileConfig>::const_iterator
               fci = fcinfo.FileConfigMap.begin();
             fci != fcinfo.FileConfigMap.end(); ++fci)
@@ -2095,6 +2136,16 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
        << "\t<Platforms>\n"
        << "\t\t<Platform\n\t\t\tName=\"" << gg->GetPlatformName() << "\"/>\n"
        << "\t</Platforms>\n";
+  if(gg->IsMasmEnabled())
+    {
+    fout <<
+      "\t<ToolFiles>\n"
+      "\t\t<DefaultToolFile\n"
+      "\t\t\tFileName=\"masm.rules\"\n"
+      "\t\t/>\n"
+      "\t</ToolFiles>\n"
+      ;
+    }
 }
 
 
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index f237f21..7aa31cc 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1680,7 +1680,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
   endif()
 
   if(MSVC AND NOT MSVC_VERSION LESS 1310
-     AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [6789]( |$)")
+     AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]( |$)"
+     AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio [89]( |$)"
+          OR CMAKE_SIZEOF_VOID_P EQUAL 4)
+      )
     ADD_TEST_MACRO(VSMASM VSMASM)
   endif()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a43f44000d12c1357eeed04e5a02d11236730dfa
commit a43f44000d12c1357eeed04e5a02d11236730dfa
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 7 12:58:25 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 20 10:21:12 2014 -0400

    VS: Move internal MasmEnabled member up to VS 7 generator
    
    Move the member from cmGlobalVisualStudio10Generator to
    cmGlobalVisualStudio7Generator to make it useful for earlier
    versions of VS.  Set the member to true only starting with
    cmGlobalVisualStudio8Generator since we will not implement
    MASM support for versions less than VS 8.

diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index c708a08..19aa52c 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -99,7 +99,6 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
     "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32);
   this->SystemIsWindowsPhone = false;
   this->SystemIsWindowsStore = false;
-  this->MasmEnabled = false;
   this->MSBuildCommandInitialized = false;
 }
 
@@ -257,15 +256,6 @@ void cmGlobalVisualStudio10Generator
 ::EnableLanguage(std::vector<std::string>const &  lang,
                  cmMakefile *mf, bool optional)
 {
-  for(std::vector<std::string>::const_iterator it = lang.begin();
-      it != lang.end(); ++it)
-    {
-    if(*it == "ASM_MASM")
-      {
-      this->MasmEnabled = true;
-      }
-    }
-
   cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
 }
 
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 6245b28..11fa954 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -58,9 +58,6 @@ public:
   /** Is the installed VS an Express edition?  */
   bool IsExpressEdition() const { return this->ExpressEdition; }
 
-  /** Is the Microsoft Assembler enabled?  */
-  bool IsMasmEnabled() const { return this->MasmEnabled; }
-
   /** The toolset name for the target platform.  */
   const char* GetPlatformToolset() const;
 
@@ -123,7 +120,6 @@ protected:
   bool SystemIsWindowsPhone;
   bool SystemIsWindowsStore;
   bool ExpressEdition;
-  bool MasmEnabled;
 
   bool UseFolderProperty();
 
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 3d79357..e312ff1 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -23,6 +23,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
 {
   this->IntelProjectVersion = 0;
   this->DevEnvCommandInitialized = false;
+  this->MasmEnabled = false;
 
   if (platformName.empty())
     {
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 390b97c..7e3ed23 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -102,6 +102,9 @@ public:
 
   virtual void FindMakeProgram(cmMakefile*);
 
+  /** Is the Microsoft Assembler enabled?  */
+  bool IsMasmEnabled() const { return this->MasmEnabled; }
+
   // Encoding for Visual Studio files
   virtual std::string Encoding();
 
@@ -173,6 +176,7 @@ protected:
   // There is one SLN file per project.
   std::string CurrentProject;
   std::string PlatformName;
+  bool MasmEnabled;
 
 private:
   char* IntelProjectVersion;
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 6bfef68..c91730f 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -136,6 +136,14 @@ void cmGlobalVisualStudio8Generator
 ::EnableLanguage(std::vector<std::string>const &  lang,
                  cmMakefile *mf, bool optional)
 {
+  for(std::vector<std::string>::const_iterator it = lang.begin();
+      it != lang.end(); ++it)
+    {
+    if(*it == "ASM_MASM")
+      {
+      this->MasmEnabled = true;
+      }
+    }
   this->AddPlatformDefinitions(mf);
   cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional);
 }

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

Summary of changes:
 Help/release/dev/vs-masm.rst               |    5 +++
 Source/cmGlobalVisualStudio10Generator.cxx |   10 ------
 Source/cmGlobalVisualStudio10Generator.h   |    4 ---
 Source/cmGlobalVisualStudio7Generator.cxx  |    1 +
 Source/cmGlobalVisualStudio7Generator.h    |    4 +++
 Source/cmGlobalVisualStudio8Generator.cxx  |    8 +++++
 Source/cmLocalVisualStudio7Generator.cxx   |   51 ++++++++++++++++++++++++++++
 Tests/CMakeLists.txt                       |    5 ++-
 8 files changed, 73 insertions(+), 15 deletions(-)
 create mode 100644 Help/release/dev/vs-masm.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list