From 1ad3317bbc19127277fba581751fba03d587f34f Mon Sep 17 00:00:00 2001 From: Maxime ROUFFET Date: Sun, 31 Mar 2024 10:52:40 +0900 Subject: [PATCH] [Fix] MSVC C4201 warning Temp fix MSVC C4201 warning that shouldn't trigger (using std=c11) in Rectangle2D.hpp --- CMakeLists.txt | 3 +++ Include/SA/Maths/Geometry/Rectangle2D.hpp | 6 ++++++ ThirdParty/SA/CMakeLists.txt | 3 +++ 3 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c8d578..44ab2a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,9 @@ add_library(SA_Maths STATIC) SA_ConfigureTarget(SA_Maths) SA_TargetSources(SA_Maths) +### Temp required to fix MSVC C4201 in Rectangle2D.hpp +target_link_libraries(SA_Maths PUBLIC SA_Support) + # Option diff --git a/Include/SA/Maths/Geometry/Rectangle2D.hpp b/Include/SA/Maths/Geometry/Rectangle2D.hpp index 34a0482..a029c56 100644 --- a/Include/SA/Maths/Geometry/Rectangle2D.hpp +++ b/Include/SA/Maths/Geometry/Rectangle2D.hpp @@ -7,6 +7,8 @@ #include +#include + /** * \file Rectangle2D.hpp * @@ -27,6 +29,8 @@ namespace SA template struct Rect2D { + SA_PRAGMA_SDWARN_MSVC(4201) + union { /// offset. @@ -57,6 +61,8 @@ namespace SA }; }; + SA_PRAGMA_EDWARN_MSVC() + /// Default constructor. Rect2D() = default; diff --git a/ThirdParty/SA/CMakeLists.txt b/ThirdParty/SA/CMakeLists.txt index 717e709..da07426 100644 --- a/ThirdParty/SA/CMakeLists.txt +++ b/ThirdParty/SA/CMakeLists.txt @@ -2,6 +2,9 @@ # Entrypoints +### Temp required to fix MSVC C4201 in Rectangle2D.hpp +SA_FetchModule(Support) + if(SA_MATHS_USE_LOGGER_OPT) SA_FetchModule(Logger)