summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorunknown <iggy@slim.>2008-04-07 01:32:59 -0400
committerunknown <iggy@slim.>2008-04-07 01:32:59 -0400
commit25e57ca9c4d7e5d703906b0272b6554b8ed1679b (patch)
tree54800ee1222295359d1843ecba1c66951611a796 /CMakeLists.txt
parented1d366a23e4320e0dcee29c642c94e6ce491fd3 (diff)
downloadmariadb-git-25e57ca9c4d7e5d703906b0272b6554b8ed1679b.tar.gz
Changes for Visual Studio 9
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 37956204faa..d4697efef93 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,18 +82,18 @@ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
+# Disable warnings in Visual Studio 8 and above
+IF(MSVC AND MSVC_VERSION GREATER 1399)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /wd4996")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /wd4996")
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
-
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
- CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ENDIF(MSVC AND MSVC_VERSION GREATER 1399)
+# Settings for Visual Studio 7 and above.
+IF(MSVC AND MSVC_VERSION GREATER 1299)
# replace /MDd with /MTd
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
@@ -123,9 +123,7 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
IF(NOT tmp_manifest)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
ENDIF(NOT tmp_manifest)
-
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
- CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ENDIF(MSVC AND MSVC_VERSION GREATER 1299)
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")