diff options
author | Mats Kindahl <mats@sun.com> | 2008-10-06 10:27:36 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2008-10-06 10:27:36 +0200 |
commit | bcaf5e0cf55fe87bf77fde836a8913ec170d7085 (patch) | |
tree | 7bac6ffa1fec91510d6ec0791124a707d0f29e3a /CMakeLists.txt | |
parent | 08399602a61dc9561773e178b8eabfb99b1ce945 (diff) | |
parent | 9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff) | |
download | mariadb-git-bcaf5e0cf55fe87bf77fde836a8913ec170d7085.tar.gz |
Merging 5.1 main into 5.1-rpl.
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ac87be249b..d41cde72d04 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") |