[Cmake-commits] CMake branch, master, updated. e0acb6ca5fbe5429b6a1cc7f7188dd3e388ffd7c

cmake-commits at cmake.org cmake-commits at cmake.org
Wed May 5 17:11:06 EDT 2010


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  e0acb6ca5fbe5429b6a1cc7f7188dd3e388ffd7c (commit)
      from  ea62d6973b657041021f00c67726cf476acd2424 (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=e0acb6ca5fbe5429b6a1cc7f7188dd3e388ffd7c
commit e0acb6ca5fbe5429b6a1cc7f7188dd3e388ffd7c
Author: David Cole <david.cole at kitware.com>
Date:   Mon May 3 21:29:08 2010 -0400

    Fix Windows-cl.cmake so that at most one MSVC** variable is defined.
    
    The expectation of users of the MSVC60, MSVC70, MSVC71, MSVC80, MSVC90
    and the new MSVC10 variables is that at most one of them will be set
    for any given build tree. This change enforces that expectation for
    build trees using Makefile generators. It also fixes the one mismatch
    in that expectation to be found in the Visual Studio generator world:
    previously, the VS 7.1 generator would set *both* MSVC70 and MSVC71;
    now, it only sets MSVC71.
    
    With these changes, user expectations are now met, and the recently
    introduced CheckCompilerRelatedVariables test should pass everywhere.

diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index e369ac1..7463c62 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -23,19 +23,15 @@ ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
 IF(CMAKE_GENERATOR MATCHES  "Visual Studio 8")
   SET(CMAKE_COMPILER_2005 1)
 ENDIF(CMAKE_GENERATOR MATCHES  "Visual Studio 8")
-IF(CMAKE_GENERATOR MATCHES  "Visual Studio 9")
-  SET(CMAKE_COMPILER_2005 1)
-ENDIF(CMAKE_GENERATOR MATCHES  "Visual Studio 9")
-
 
 # make sure to enable languages after setting configuration types
 ENABLE_LANGUAGE(RC)
 SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
 
-# for nmake we need to compute some information about the compiler 
+# for nmake we need to compute some information about the compiler
 # that is being used.
 # the compiler may be free command line, 6, 7, or 71, and
-# each have properties that must be determined.  
+# each have properties that must be determined.
 # to avoid running these tests with each cmake run, the
 # test results are saved in CMakeCPlatform.cmake, a file
 # that is automatically copied into try_compile directories
@@ -87,25 +83,12 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
         SET(MSVC80 1)
         SET(CMAKE_COMPILER_2005 1)
       ENDIF("${compilerVersion}" EQUAL 1400)
-      IF("${compilerVersion}" GREATER 1400)
-        SET(MSVC80 1)
-        SET(CMAKE_COMPILER_2005 1)
-      ENDIF("${compilerVersion}" GREATER 1400)
-      IF("${compilerVersion}" GREATER 1400)
-        SET(MSVC80 1)
-        SET(CMAKE_COMPILER_2005 1)
-      ENDIF("${compilerVersion}" GREATER 1400)
       IF("${compilerVersion}" EQUAL 1500)
         SET(MSVC90 1)
-        SET(MSVC80 0)
       ENDIF("${compilerVersion}" EQUAL 1500)
-      IF("${compilerVersion}" GREATER 1500)
-        SET(MSVC90 1)
-        SET(MSVC80 0)
-      ENDIF("${compilerVersion}" GREATER 1500)
       IF("${compilerVersion}" EQUAL 1600)
         SET(MSVC10 1)
-      ENDIF()
+      ENDIF("${compilerVersion}" EQUAL 1600)
       SET(MSVC_VERSION "${compilerVersion}")
     ELSE(NOT CMAKE_COMPILER_RETURN)
       MESSAGE(STATUS "Check for CL compiler version - failed")
@@ -224,7 +207,7 @@ ENDIF(NOT _MACHINE_ARCH_FLAG)
 SET (CMAKE_EXE_LINKER_FLAGS_INIT
     "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
 
-# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp
+# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
 # on versions that support it
 SET( MSVC_INCREMENTAL_YES_FLAG "")
 IF(NOT MSVC_INCREMENTAL_DEFAULT)
@@ -256,7 +239,6 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELW
 SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
 SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
 
-
 # save computed information for this platform
 IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
   CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in 
@@ -267,4 +249,3 @@ IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
   CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in 
                ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
 ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
-
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index d608aac..1191575 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -37,6 +37,7 @@ cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
 void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf)
 {
   this->cmGlobalVisualStudio7Generator::AddPlatformDefinitions(mf);
+  mf->RemoveDefinition("MSVC70");
   mf->AddDefinition("MSVC71", "1");
 }
 

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

Summary of changes:
 Modules/Platform/Windows-cl.cmake          |   27 ++++-----------------------
 Source/cmGlobalVisualStudio71Generator.cxx |    1 +
 2 files changed, 5 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list