[Cmake-commits] CMake branch, next, updated. v2.8.5-1963-g6a9df8e

Brad King brad.king at kitware.com
Fri Sep 23 12:15:36 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  6a9df8e3024598ceac25d81d75b7e962e55ae1a8 (commit)
       via  3b5256e19e27794ba871b0149f4c8f0237d1e872 (commit)
       via  3d5632ed59d3d46298304d20d3f11f9d1da02f93 (commit)
      from  68f582ae97ae45bbf8365f8397aedd6f7632a626 (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=6a9df8e3024598ceac25d81d75b7e962e55ae1a8
commit 6a9df8e3024598ceac25d81d75b7e962e55ae1a8
Merge: 68f582a 3b5256e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 23 12:15:32 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 23 12:15:32 2011 -0400

    Merge topic 'vs11-generator' into next
    
    3b5256e Teach our tests about special cases for VS 11
    3d5632e Add Visual Studio 11 generator for x86 and x64 tools


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b5256e19e27794ba871b0149f4c8f0237d1e872
commit 3b5256e19e27794ba871b0149f4c8f0237d1e872
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 23 11:04:15 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 23 11:07:24 2011 -0400

    Teach our tests about special cases for VS 11
    
    Teach the CheckCompilerRelatedVariables test to verify MSVC11.  Update
    the special cases already in the Preprocess and VSExternalInclude tests
    for VS 10 to work for VS 11 too.

diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
index 8095a1c..8b279a5 100644
--- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -34,6 +34,9 @@ endif()
 if(DEFINED MSVC10)
   math(EXPR msvc_total "${msvc_total} + 1")
 endif()
+if(DEFINED MSVC11)
+  math(EXPR msvc_total "${msvc_total} + 1")
+endif()
 
 echo_var(MSVC)
 echo_var(MSVC60)
@@ -42,6 +45,7 @@ echo_var(MSVC71)
 echo_var(MSVC80)
 echo_var(MSVC90)
 echo_var(MSVC10)
+echo_var(MSVC11)
 
 if(MSVC)
   #
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index b4ec17c..1ed7b83 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -37,6 +37,9 @@ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
 if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
   set(PP_VS100 1)
 endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11")
+  set(PP_VS110 1)
+endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11")
 
 # Some tests below check the PP_* variables set above.  They are meant
 # to test the case that the build tool is at fault.  Other tests below
@@ -52,7 +55,7 @@ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
 # must not have it escaped inside the configured header.
 set(STRING_EXTRA "")
 
-if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100)
+if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100 AND NOT PP_VS110)
   # Borland, VS70 IDE: ;
   # The Borland compiler will simply not accept a non-escaped semicolon
   # on the command line.  If it is escaped \; then the escape character
diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt
index 1e68968..a2fd619 100644
--- a/Tests/VSExternalInclude/CMakeLists.txt
+++ b/Tests/VSExternalInclude/CMakeLists.txt
@@ -6,7 +6,7 @@ IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
 ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
   SET(PROJECT_EXT vcproj)
 ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
-IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 10")
+IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]")
   SET(PROJECT_EXT vcxproj)
 ENDIF()
 
@@ -46,7 +46,7 @@ ADD_DEPENDENCIES(VSExternalInclude lib2)
 # and the sln file can no longer be the only source
 # of that depend.  So, for VS 10 make the executable
 # depend on lib1 and lib2
-IF(MSVC10)
+IF(MSVC10 OR MSVC11)
   ADD_DEPENDENCIES(VSExternalInclude lib1)
 ENDIF()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d5632ed59d3d46298304d20d3f11f9d1da02f93
commit 3d5632ed59d3d46298304d20d3f11f9d1da02f93
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 23 09:07:40 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 23 10:10:01 2011 -0400

    Add Visual Studio 11 generator for x86 and x64 tools

diff --git a/Modules/CMakeVS11FindMake.cmake b/Modules/CMakeVS11FindMake.cmake
new file mode 100644
index 0000000..302efaa
--- /dev/null
+++ b/Modules/CMakeVS11FindMake.cmake
@@ -0,0 +1,54 @@
+
+#=============================================================================
+# Copyright 2007-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# Look for devenv as a build program.  We need to use this to support
+# Intel Fortran integration into VS.  MSBuild can not be used for that case
+# since Intel Fortran uses the older devenv file format.
+FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+  NAMES devenv
+  HINTS
+  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;EnvironmentDirectory]
+  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup;Dbghelp_path]
+  "$ENV{ProgramFiles}/Microsoft Visual Studio 11.0/Common7/IDE"
+  "$ENV{ProgramFiles}/Microsoft Visual Studio11.0/Common7/IDE"
+  "$ENV{ProgramFiles}/Microsoft Visual Studio 11/Common7/IDE"
+  "$ENV{ProgramFiles}/Microsoft Visual Studio11/Common7/IDE"
+  "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11.0/Common7/IDE"
+  "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11.0/Common7/IDE"
+  "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11/Common7/IDE"
+  "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11/Common7/IDE"
+  "/Program Files/Microsoft Visual Studio 11.0/Common7/IDE/"
+  "/Program Files/Microsoft Visual Studio 11/Common7/IDE/"
+  )
+
+# if devenv is not found, then use MSBuild.
+# it is expected that if devenv is not found, then we are
+# dealing with Visual Studio Express.  VCExpress has random
+# failures when being run as a command line build tool which
+# causes the compiler checks and try-compile stuff to fail. MSbuild
+# is a better choice for this.  However, VCExpress does not support
+# cross compiling needed for Win CE.
+IF(NOT CMAKE_CROSSCOMPILING)
+  FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+    NAMES MSBuild
+    HINTS
+    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
+    "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
+    "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
+    "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
+ENDIF()
+
+MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+SET(MSVC11 1)
+SET(MSVC_VERSION 1700)
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 96b3ea0..ba41d98 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -324,6 +324,10 @@ IF (WIN32)
       cmGlobalVisualStudio10Win64Generator.cxx
       cmGlobalVisualStudio10IA64Generator.h
       cmGlobalVisualStudio10IA64Generator.cxx
+      cmGlobalVisualStudio11Generator.h
+      cmGlobalVisualStudio11Generator.cxx
+      cmGlobalVisualStudio11Win64Generator.h
+      cmGlobalVisualStudio11Win64Generator.cxx
       cmGlobalVisualStudioGenerator.cxx
       cmGlobalVisualStudioGenerator.h
       cmGlobalWatcomWMakeGenerator.cxx
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 8573670..18b483d 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -79,7 +79,6 @@ protected:
   virtual const char* GetIDEVersion() { return "10.0"; }
 
   std::string PlatformToolset;
-private:
   bool ExpressEdition;
 };
 #endif
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
new file mode 100644
index 0000000..a70427a
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -0,0 +1,45 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio11Generator.h"
+#include "cmMakefile.h"
+
+//----------------------------------------------------------------------------
+cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator()
+{
+  this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
+  this->ExpressEdition = false; // TODO: VS 11 Express support
+  this->PlatformToolset = "v110";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator::AddPlatformDefinitions(cmMakefile* mf)
+{
+  mf->AddDefinition("MSVC11", "1");
+  mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+  mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
+{
+  fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
+  fout << "# Visual Studio 2011\n";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator
+::GetDocumentation(cmDocumentationEntry& entry) const
+{
+  entry.Name = this->GetName();
+  entry.Brief = "Generates Visual Studio 11 project files.";
+  entry.Full = "";
+}
diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h
new file mode 100644
index 0000000..14019a7
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Generator.h
@@ -0,0 +1,43 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio11Generator_h
+#define cmGlobalVisualStudio11Generator_h
+
+#include "cmGlobalVisualStudio10Generator.h"
+
+
+/** \class cmGlobalVisualStudio11Generator  */
+class cmGlobalVisualStudio11Generator:
+  public cmGlobalVisualStudio10Generator
+{
+public:
+  cmGlobalVisualStudio11Generator();
+  static cmGlobalGenerator* New() {
+    return new cmGlobalVisualStudio11Generator; }
+
+  ///! Get the name for the generator.
+  virtual const char* GetName() const {
+    return cmGlobalVisualStudio11Generator::GetActualName();}
+  static const char* GetActualName() {return "Visual Studio 11";}
+  virtual void AddPlatformDefinitions(cmMakefile* mf);
+
+  virtual void WriteSLNHeader(std::ostream& fout);
+
+  /** Get the documentation entry for this generator.  */
+  virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+  /** TODO: VS 11 user macro support. */
+  virtual std::string GetUserMacrosDirectory() { return ""; }
+protected:
+  virtual const char* GetIDEVersion() { return "11.0"; }
+};
+#endif
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.cxx b/Source/cmGlobalVisualStudio11Win64Generator.cxx
new file mode 100644
index 0000000..10c9027
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Win64Generator.cxx
@@ -0,0 +1,33 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio11Win64Generator.h"
+#include "cmMakefile.h"
+#include "cmake.h"
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Win64Generator
+::GetDocumentation(cmDocumentationEntry& entry) const
+{
+  entry.Name = this->GetName();
+  entry.Brief = "Generates Visual Studio 11 Win64 project files.";
+  entry.Full = "";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Win64Generator
+::AddPlatformDefinitions(cmMakefile* mf)
+{
+  this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
+  mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
+  mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
+  mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
+}
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.h b/Source/cmGlobalVisualStudio11Win64Generator.h
new file mode 100644
index 0000000..53f1953
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Win64Generator.h
@@ -0,0 +1,37 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio11Win64Generator_h
+#define cmGlobalVisualStudio11Win64Generator_h
+
+#include "cmGlobalVisualStudio11Generator.h"
+
+class cmGlobalVisualStudio11Win64Generator :
+  public cmGlobalVisualStudio11Generator
+{
+public:
+  cmGlobalVisualStudio11Win64Generator() {}
+  static cmGlobalGenerator* New() {
+    return new cmGlobalVisualStudio11Win64Generator; }
+
+  ///! Get the name for the generator.
+  virtual const char* GetName() const {
+    return cmGlobalVisualStudio11Win64Generator::GetActualName();}
+  static const char* GetActualName() {return "Visual Studio 11 Win64";}
+
+  virtual const char* GetPlatformName() const {return "x64";}
+
+  /** Get the documentation entry for this generator.  */
+  virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+  virtual void AddPlatformDefinitions(cmMakefile* mf);
+};
+#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 41c67e2..05699da 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -68,6 +68,8 @@
 #    include "cmGlobalVisualStudio10Generator.h"
 #    include "cmGlobalVisualStudio10IA64Generator.h"
 #    include "cmGlobalVisualStudio10Win64Generator.h"
+#    include "cmGlobalVisualStudio11Generator.h"
+#    include "cmGlobalVisualStudio11Win64Generator.h"
 #    include "cmGlobalVisualStudio8Win64Generator.h"
 #    include "cmGlobalBorlandMakefileGenerator.h"
 #    include "cmGlobalNMakeMakefileGenerator.h"
@@ -2580,6 +2582,10 @@ void cmake::AddDefaultGenerators()
     &cmGlobalVisualStudio10IA64Generator::New;
   this->Generators[cmGlobalVisualStudio10Win64Generator::GetActualName()] =
     &cmGlobalVisualStudio10Win64Generator::New;
+  this->Generators[cmGlobalVisualStudio11Generator::GetActualName()] =
+    &cmGlobalVisualStudio11Generator::New;
+  this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
+    &cmGlobalVisualStudio11Win64Generator::New;
   this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
     &cmGlobalVisualStudio71Generator::New;
   this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =

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

Summary of changes:
 ...eVS10FindMake.cmake => CMakeVS11FindMake.cmake} |   38 +++++++++---------
 Source/CMakeLists.txt                              |    4 ++
 Source/cmGlobalVisualStudio10Generator.h           |    1 -
 ...tor.cxx => cmGlobalVisualStudio11Generator.cxx} |   42 ++++++++-----------
 ...nerator.h => cmGlobalVisualStudio11Generator.h} |   29 +++++++------
 ...xx => cmGlobalVisualStudio11Win64Generator.cxx} |   30 +++-----------
 ...or.h => cmGlobalVisualStudio11Win64Generator.h} |   23 +++++------
 Source/cmake.cxx                                   |    6 +++
 Tests/CheckCompilerRelatedVariables/CMakeLists.txt |    4 ++
 Tests/Preprocess/CMakeLists.txt                    |    5 ++-
 Tests/VSExternalInclude/CMakeLists.txt             |    4 +-
 11 files changed, 89 insertions(+), 97 deletions(-)
 copy Modules/{CMakeVS10FindMake.cmake => CMakeVS11FindMake.cmake} (61%)
 copy Source/{cmGlobalVisualStudio10IA64Generator.cxx => cmGlobalVisualStudio11Generator.cxx} (50%)
 copy Source/{cmGlobalVisualStudio10IA64Generator.h => cmGlobalVisualStudio11Generator.h} (57%)
 copy Source/{cmGlobalVisualStudio10Win64Generator.cxx => cmGlobalVisualStudio11Win64Generator.cxx} (53%)
 copy Source/{cmGlobalVisualStudio10Win64Generator.h => cmGlobalVisualStudio11Win64Generator.h} (58%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list