[cmake-commits] hoffman committed Windows-cl.cmake 1.80 1.81

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Sep 17 15:20:56 EDT 2007


Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv14521/Modules/Platform

Modified Files:
	Windows-cl.cmake 
Log Message:
ENH: add support for vs 2008 beta 2


Index: Windows-cl.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Windows-cl.cmake,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- Windows-cl.cmake	2 Aug 2007 15:17:32 -0000	1.80
+++ Windows-cl.cmake	17 Sep 2007 19:20:54 -0000	1.81
@@ -13,16 +13,20 @@
 IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
    SET (CMAKE_NO_BUILD_TYPE 1)
 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
+IF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
   SET (CMAKE_NO_BUILD_TYPE 1)
   SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING 
      "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
   MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
 # does the compiler support pdbtype and is it the newer compiler
 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)
@@ -87,6 +91,14 @@
         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}" GREATER 1500)
+        SET(MSVC90 1)
+        SET(MSVC80 0)
+      ENDIF("${compilerVersion}" GREATER 1500)
       SET(MSVC_VERSION "${compilerVersion}")
     ELSE(NOT CMAKE_COMPILER_RETURN)
       MESSAGE(STATUS "Check for CL compiler version - failed")
@@ -154,7 +166,7 @@
 
 
 # default to Debug builds
-IF(MSVC80)
+IF(MSVC_VERSION GREATER 1310)
   # Not used by generator directly but referenced below.
   SET(CMAKE_CREATE_LIB_MANIFEST
     "$(CMAKE_COMMAND) -DTARGET=<TARGET> -DCMAKE_CL_NOLOGO=${CMAKE_CL_NOLOGO} -P \"${CMAKE_ROOT}/Modules/CMakeVCManifest.cmake\"")
@@ -188,7 +200,7 @@
   SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
   SET (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ")
   SET (CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /MANIFEST")
-ELSE(MSVC80)
+ELSE(MSVC_VERSION GREATER 1310)
   IF(CMAKE_USING_VC_FREE_TOOLS)
     MESSAGE(STATUS "Using FREE VC TOOLS, NO DEBUG available")
     SET(CMAKE_BUILD_TYPE_INIT Release)
@@ -217,7 +229,7 @@
     SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
     SET (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
   ENDIF(CMAKE_USING_VC_FREE_TOOLS)
-ENDIF(MSVC80)
+ENDIF(MSVC_VERSION GREATER 1310)
 
 SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
 



More information about the Cmake-commits mailing list