summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2008-09-01 11:48:21 +0200
committerVladislav Vaintroub <vvaintroub@mysql.com>2008-09-01 11:48:21 +0200
commit4e97988b2c548ac96b059d7fc69f491e2ed09f31 (patch)
tree52abd6d836c14f40a08533e4c0a0a8faec5eb557 /CMakeLists.txt
parent44b82b3ecabd044ddadba885349edf16c6686263 (diff)
parent8b9d3a4ea1c6eed778df026e15c813bc87f4d316 (diff)
downloadmariadb-git-4e97988b2c548ac96b059d7fc69f491e2ed09f31.tar.gz
merge
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 d64ea3df488..7107a112f19 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,18 +108,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 NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
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 NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
+# Settings for Visual Studio 7 and above.
+IF(MSVC)
# 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})
@@ -149,9 +149,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)
IF(WIN32)
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")