diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-09-17 19:21:47 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-09-17 19:21:47 (GMT) |
commit | 9cbb9987371627841a8c508c0880f901a78e844a (patch) | |
tree | c95234acf6875f463574ac782048602a49accf52 /Modules/Platform | |
parent | 1d81cf994a85ddc0cc6c0626928c33cb8d94ea6d (diff) | |
download | CMake-9cbb9987371627841a8c508c0880f901a78e844a.zip CMake-9cbb9987371627841a8c508c0880f901a78e844a.tar.gz CMake-9cbb9987371627841a8c508c0880f901a78e844a.tar.bz2 |
ENH: add support for vs 2008 beta 2
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index 0c8e718..c9b2822 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -13,16 +13,20 @@ SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console) 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 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles") 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 @@ ENDIF(CMAKE_FORCE_WIN64) # 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 @@ IF(MSVC80) 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 @@ ELSE(MSVC80) 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}") |