[Cmake-commits] CMake branch, next, updated. v3.0.1-4881-g561267f

Brad King brad.king at kitware.com
Tue Aug 12 10:20:52 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  561267f15216de102807a42e043b9aebe1ea5388 (commit)
       via  962d179d46462ac6fb4c1076f33b69bda65dbbb0 (commit)
       via  19880cc55d5913c53692b78ca53bbd15360cef50 (commit)
       via  34729294e5a5c6e23ba1d41127c5ca6f1832596d (commit)
       via  a934a846438beb31d664caf7fc93c965aaf3ca50 (commit)
       via  9ef7e0863706f629c8e6360ff599003082bca4cf (commit)
      from  6b923df4c355496816aefbe5793d892d4ac907d1 (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=561267f15216de102807a42e043b9aebe1ea5388
commit 561267f15216de102807a42e043b9aebe1ea5388
Merge: 6b923df 962d179
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 12 10:20:51 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 12 10:20:51 2014 -0400

    Merge topic 'vs-masm' into next
    
    962d179d VS: Add test for MASM support
    19880cc5 VS: Add MASM support to VS 8 and 9 (#8170, #14984)
    34729294 VS: Move internal MasmEnabled member up to VS 7 generator
    a934a846 VS: Fix ASM_MASM support in VS >= 10
    9ef7e086 cmLocalVisualStudio7Generator: Rename local 'lang' var


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=962d179d46462ac6fb4c1076f33b69bda65dbbb0
commit 962d179d46462ac6fb4c1076f33b69bda65dbbb0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 7 14:53:57 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:06:36 2014 -0400

    VS: Add test for MASM support
    
    It is now expected to work with VS >= 8 and MSVC >= 13.0 for i386.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index ca7fcdc..691e503 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1679,6 +1679,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC")
   endif()
 
+  if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4
+      AND NOT MSVC60 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]( |$)")
+    ADD_TEST_MACRO(VSMASM VSMASM)
+  endif()
+
   if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
     if(NOT MSVC60)
       ADD_TEST_MACRO(SBCS SBCS)
diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt
new file mode 100644
index 0000000..62e818d
--- /dev/null
+++ b/Tests/VSMASM/CMakeLists.txt
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 2.8.12)
+project(VSMASM C ASM_MASM)
+if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
+  message(FATAL_ERROR "This test works only with i386 architecture.")
+endif()
+add_executable(VSMASM main.c foo.asm)
diff --git a/Tests/VSMASM/foo.asm b/Tests/VSMASM/foo.asm
new file mode 100644
index 0000000..2a4519c
--- /dev/null
+++ b/Tests/VSMASM/foo.asm
@@ -0,0 +1,8 @@
+.386
+.model flat, c
+.code
+foo proc public
+  mov eax,0
+  ret
+foo endp
+end
diff --git a/Tests/VSMASM/main.c b/Tests/VSMASM/main.c
new file mode 100644
index 0000000..570ba16
--- /dev/null
+++ b/Tests/VSMASM/main.c
@@ -0,0 +1,2 @@
+extern int foo(void);
+int main(void) { return foo(); }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19880cc55d5913c53692b78ca53bbd15360cef50
commit 19880cc55d5913c53692b78ca53bbd15360cef50
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: Tue Aug 12 10:06:36 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..d2b2bf7 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -862,6 +862,14 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
       }
     }
   fout << "/>\n";  // end of <Tool Name=VCCLCompilerTool
+  if(gg->IsMasmEnabled() && !this->FortranProject)
+    {
+    fout <<
+      "\t\t\t<Tool\n"
+      "\t\t\t\tName=\"MASM\"\n"
+      "\t\t\t/>\n"
+      ;
+    }
   tool = "VCCustomBuildTool";
   if(this->FortranProject)
     {
@@ -1700,6 +1708,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 +1736,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 +2109,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"
+      ;
+    }
 }
 
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34729294e5a5c6e23ba1d41127c5ca6f1832596d
commit 34729294e5a5c6e23ba1d41127c5ca6f1832596d
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: Tue Aug 12 10:06:34 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);
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a934a846438beb31d664caf7fc93c965aaf3ca50
commit a934a846438beb31d664caf7fc93c965aaf3ca50
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 7 14:47:43 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:05:20 2014 -0400

    VS: Fix ASM_MASM support in VS >= 10
    
    Fix a typo introduced by commit ce511435 (stringapi: Use strings for the
    languages, 2014-02-03) to check the language name correctly.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 291827a..108a24b 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1123,7 +1123,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
       {
       tool = "ClCompile";
       }
-    else if (lang == "ASM_NASM" &&
+    else if (lang == "ASM_MASM" &&
              this->GlobalGenerator->IsMasmEnabled())
       {
       tool = "MASM";

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ef7e0863706f629c8e6360ff599003082bca4cf
commit 9ef7e0863706f629c8e6360ff599003082bca4cf
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 7 15:18:27 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:05:19 2014 -0400

    cmLocalVisualStudio7Generator: Rename local 'lang' var
    
    In the WriteGroup method, rename the 'lang' var to 'ppLang' since
    it is specifically for the preprocessor definitions language selection.

diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 3ed4a48..29165f8 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1695,7 +1695,7 @@ bool cmLocalVisualStudio7Generator
       else if(!fcinfo.FileConfigMap.empty())
         {
         const char* aCompilerTool = "VCCLCompilerTool";
-        const char* lang = "CXX";
+        const char* ppLang = "CXX";
         if(this->FortranProject)
           {
           aCompilerTool = "VFFortranCompilerTool";
@@ -1713,7 +1713,7 @@ bool cmLocalVisualStudio7Generator
         if(ext == "rc")
           {
           aCompilerTool = "VCResourceCompilerTool";
-          lang = "RC";
+          ppLang = "RC";
           if(this->FortranProject)
             {
             aCompilerTool = "VFResourceCompilerTool";
@@ -1763,7 +1763,7 @@ bool cmLocalVisualStudio7Generator
             fileOptions.OutputFlagMap(fout, "\t\t\t\t\t");
             fileOptions.OutputPreprocessorDefinitions(fout,
                                                       "\t\t\t\t\t", "\n",
-                                                      lang);
+                                                      ppLang);
             }
           if(!fc.AdditionalDeps.empty())
             {

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

Summary of changes:
 Source/cmGlobalVisualStudio10Generator.cxx |   10 ----------
 Source/cmGlobalVisualStudio10Generator.h   |    4 ----
 Source/cmGlobalVisualStudio7Generator.cxx  |    1 +
 Source/cmGlobalVisualStudio7Generator.h    |    4 ++++
 Source/cmGlobalVisualStudio8Generator.cxx  |    8 ++++++++
 Source/cmLocalVisualStudio7Generator.cxx   |   30 +++++++++++++++++++++++++---
 Source/cmVisualStudio10TargetGenerator.cxx |    2 +-
 Tests/CMakeLists.txt                       |    5 +++++
 Tests/VSMASM/CMakeLists.txt                |    6 ++++++
 Tests/VSMASM/foo.asm                       |    8 ++++++++
 Tests/VSMASM/main.c                        |    2 ++
 11 files changed, 62 insertions(+), 18 deletions(-)
 create mode 100644 Tests/VSMASM/CMakeLists.txt
 create mode 100644 Tests/VSMASM/foo.asm
 create mode 100644 Tests/VSMASM/main.c


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list