Commit 5888860d by Vicent Marti

msvc: Disable warnings in header file

Remove clutter from the CMakeLists file by disabling the warnings
programatically.
parent d215cf24
...@@ -53,7 +53,7 @@ OPTION (BUILD_CLAY "Build Tests using the Clay suite" ON) ...@@ -53,7 +53,7 @@ OPTION (BUILD_CLAY "Build Tests using the Clay suite" ON)
# Platform specific compilation flags # Platform specific compilation flags
IF (MSVC) IF (MSVC)
SET(CMAKE_C_FLAGS "/W4 /WX /nologo /Zi /wd4127") SET(CMAKE_C_FLAGS "/W4 /nologo /Zi")
IF (STDCALL) IF (STDCALL)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz")
ENDIF () ENDIF ()
......
...@@ -9,6 +9,16 @@ ...@@ -9,6 +9,16 @@
#if defined(_MSC_VER) #if defined(_MSC_VER)
/*
* Disable silly MSVC warnings
*/
/* conditional expression is constant */
#pragma warning(disable: 4127)
/* nonstandard extension used : bit field types other than int */
#pragma warning(disable: 4214)
/* access() mode parameter #defines */ /* access() mode parameter #defines */
# define F_OK 0 /* existence check */ # define F_OK 0 /* existence check */
# define W_OK 2 /* write mode check */ # define W_OK 2 /* write mode check */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment