diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2015-04-18 21:54:05 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2015-04-20 12:26:12 +0200 |
commit | b43ad50be70c6ad6982b3560dd60b8b6411e1f57 (patch) | |
tree | 7fc60a07bb339013cc09e6d47ef3d8a83def0128 | |
parent | b7086e051347cff5a71b63a5010e4c280c4adf4b (diff) |
cmake: Add msvc support for sign-compare warnings.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90089
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | cmake/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 6fbe23e7..28de329e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -202,8 +202,13 @@ if(DBUS_WITH_GLIB) endif() SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wsign-compare") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare") +if(MSVC) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w14018") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w14018") +else() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wsign-compare") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare") +endif() ######################################################################### # Windows CE (>= 5.0.0) |