From: José Fonseca <[email protected]>
Very few people are building piglit with MSVC, and the current avalanche
of insignificant warnings ends up being a disservice for those who do, as
it only ends up hiding potential problems.
---
CMakeLists.txt | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f45d2e..2a63b78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,11 +238,12 @@ else ()
include_directories ("include/msvc/c99")
endif ()
- # -Wall or (/Wall) is actually supported by MSVC and would be detected
- # by CHECK_C_COMPILER_FLAG above, but is very pedantic, causing
- # thousand of warnings when including windows.h.
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W4")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W4")
+ # Adjust warnings
+ add_definitions (-W3)
+ add_definitions (-wd4018) # signed/unsigned mismatch
+ add_definitions (-wd4244) # conversion from 'type1' to 'type2',
possible loss of data
+ add_definitions (-wd4305) # truncation from 'type1' to 'type2'
+ add_definitions (-wd4800) # forcing value to bool 'true' or 'false'
(performance warning)
add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
--
1.9.1
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit