Skip to content

Commit b132d4d

Browse files
committed
Windows, compilation : Treat warning as error, if MYSQL_MAINTAINER_MODE
is set to ERR This matches gcc/clang handling.
1 parent 7d201d7 commit b132d4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/os/Windows.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ IF(MSVC)
142142
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700 /we4311 /we4477 /we4302 /we4090 /wd4267 ")
143143
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700 /we4311 /we4477 /we4302 /we4090 /wd4267")
144144

145+
IF(MYSQL_MAINTAINER_MODE MATCHES "ERR")
146+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
147+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
148+
ENDIF()
149+
145150
ENDIF()
146151

147152
# Always link with socket library

0 commit comments

Comments
 (0)