summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-09-09 12:08:47 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2019-09-09 13:52:30 +0200
commita895c68c58441e84d8ecbe336a7bbd19fc995e37 (patch)
tree52472a77d4b0f9b73bfd9d82db71daf3aebb4de4 /cmake
parentd251b76884557580d1dbac877e3b22216c55ecee (diff)
downloadmariadb-git-a895c68c58441e84d8ecbe336a7bbd19fc995e37.tar.gz
On Windows, treat linker warnings as errors, if
MYSQL_MAINTAINER_MODE is ERR
Diffstat (limited to 'cmake')
-rw-r--r--cmake/os/Windows.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake
index efbbfc285c0..ae0beeae5c5 100644
--- a/cmake/os/Windows.cmake
+++ b/cmake/os/Windows.cmake
@@ -154,6 +154,11 @@ IF(MSVC)
IF(MYSQL_MAINTAINER_MODE MATCHES "ERR")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+ FOREACH(type EXE SHARED MODULE)
+ FOREACH(cfg RELEASE DEBUG RELWITHDEBINFO)
+ SET(CMAKE_${type}_LINKER_FLAGS_${cfg} "${CMAKE_${type}_LINKER_FLAGS_${cfg}} /WX")
+ ENDFOREACH()
+ ENDFOREACH()
ENDIF()
IF(MSVC_VERSION LESS 1910)
# Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning),