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 | |
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')
-rw-r--r-- | Modules/CMakeVS8FindMake.cmake | 1 | ||||
-rw-r--r-- | Modules/CMakeVS9FindMake.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 22 |
3 files changed, 34 insertions, 5 deletions
diff --git a/Modules/CMakeVS8FindMake.cmake b/Modules/CMakeVS8FindMake.cmake index 79aa5a8..d6ca4aa 100644 --- a/Modules/CMakeVS8FindMake.cmake +++ b/Modules/CMakeVS8FindMake.cmake @@ -13,3 +13,4 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM ) MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) SET(MSVC80 1) +SET(MSVC_VERSION 1400) diff --git a/Modules/CMakeVS9FindMake.cmake b/Modules/CMakeVS9FindMake.cmake new file mode 100644 index 0000000..a2c8e72 --- /dev/null +++ b/Modules/CMakeVS9FindMake.cmake @@ -0,0 +1,16 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES VCExpress devenv + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;EnvironmentDirectory] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup;Dbghelp_path] + "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio 9/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio9/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 9/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9/Common7/IDE" + "/Program Files/Microsoft Visual Studio 9/Common7/IDE/" + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC90 1) +SET(MSVC_VERSION 1500) 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}") |