From a16aca0f037083bc42856fbcc20d08b94145d8ce Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Fri, 18 Nov 2022 15:09:50 -0600 Subject: [PATCH 1/3] up MSVC warning level to /W3 /WX This makes MSVC warn at a level comparable to what we use on gcc for Linux builds --- CMakeLists.txt | 4 ++++ docs/changelog.txt | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e6f5c835..7c2cb36fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) if(MSVC) + # increase warning level + add_definitions("/WX") + add_definitions("/W3") + # disable C4819 code-page warning add_definitions("/wd4819") diff --git a/docs/changelog.txt b/docs/changelog.txt index 8413276f3..70531c8a6 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -111,6 +111,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - ``gui.Screen.show()`` now returns ``self`` as a convenience - ``gui.View.getMousePos()`` now takes an optional ``ViewRect`` parameter in case the caller wants to get the mouse pos relative to a rect that is not the frame_body (such as the frame_rect) +## Build configuration +- MSVC warning level upped to /W3, and /WX added to make warnings cause compilations to fail. + # 0.47.05-r7 ## New Plugins From b6ffaebedaf1a32adfcfafd851dfeee162cb5029 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Fri, 18 Nov 2022 15:29:02 -0600 Subject: [PATCH 2/3] refine comments --- CMakeLists.txt | 2 +- docs/changelog.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c2cb36fc..c03037973 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) if(MSVC) - # increase warning level + # increase warning level and treat warnings as errors add_definitions("/WX") add_definitions("/W3") diff --git a/docs/changelog.txt b/docs/changelog.txt index 70531c8a6..83aca94e8 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -111,7 +111,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - ``gui.Screen.show()`` now returns ``self`` as a convenience - ``gui.View.getMousePos()`` now takes an optional ``ViewRect`` parameter in case the caller wants to get the mouse pos relative to a rect that is not the frame_body (such as the frame_rect) -## Build configuration +## Internal - MSVC warning level upped to /W3, and /WX added to make warnings cause compilations to fail. # 0.47.05-r7 From 0d5b80204f46f8a190085cd7d18a35410010f4cf Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Fri, 18 Nov 2022 15:35:08 -0600 Subject: [PATCH 3/3] `Internals` not `Internal` --- docs/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 83aca94e8..8c5e4c98a 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -111,7 +111,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - ``gui.Screen.show()`` now returns ``self`` as a convenience - ``gui.View.getMousePos()`` now takes an optional ``ViewRect`` parameter in case the caller wants to get the mouse pos relative to a rect that is not the frame_body (such as the frame_rect) -## Internal +## Internals - MSVC warning level upped to /W3, and /WX added to make warnings cause compilations to fail. # 0.47.05-r7