From a346662c4ecc48974f412f32c9e26145d184733b Mon Sep 17 00:00:00 2001 From: Pierre Wielders Date: Mon, 2 Oct 2023 09:38:35 +0200 Subject: [PATCH] [WINDOWS] Make sure the warning reporting is building under windows as well! (#1414) Take care there is a hard link between selecting warning reporting as a library and the build flags for core in this commit, the build flag __CORE_WARNING_REPORTING__ for core needs to be enabled if the warning reporting library is build (otherwise that build will fail!) --- Source/core/WarningReportingControl.h | 17 +++++++++++++---- Source/core/core.vcxproj | 9 +++++---- Source/core/core.vcxproj.filters | 3 +++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Source/core/WarningReportingControl.h b/Source/core/WarningReportingControl.h index 55432fe1f..0f60c26bf 100644 --- a/Source/core/WarningReportingControl.h +++ b/Source/core/WarningReportingControl.h @@ -19,10 +19,6 @@ #pragma once -#include - -#include "CallsignTLS.h" -#include "IWarningReportingControl.h" #include "Module.h" #include "Optional.h" #include "SystemInfo.h" @@ -30,6 +26,10 @@ #include "Time.h" #include "Trace.h" #include "TypeTraits.h" +#include "CallsignTLS.h" +#include "IWarningReportingControl.h" + +#include #include #include @@ -571,12 +571,21 @@ namespace WarningReporting { static WarningReportingControl _sWarningControl; }; + #ifdef __WINDOWS__ + template + typename WarningReportingType::template WarningReportingControl WarningReportingType::_sWarningControl; + template + std::atomic WarningReportingBoundsCategory::_reportingBound(CONTROLCATEGORY::DefaultReportBound); + template + std::atomic WarningReportingBoundsCategory::_warningBound(CONTROLCATEGORY::DefaultWarningBound); + #else template EXTERNAL typename WarningReportingType::template WarningReportingControl WarningReportingType::_sWarningControl; template EXTERNAL std::atomic WarningReportingBoundsCategory::_reportingBound(CONTROLCATEGORY::DefaultReportBound); template EXTERNAL std::atomic WarningReportingBoundsCategory::_warningBound(CONTROLCATEGORY::DefaultWarningBound); + #endif } } diff --git a/Source/core/core.vcxproj b/Source/core/core.vcxproj index 6766ba747..c8618cf8b 100644 --- a/Source/core/core.vcxproj +++ b/Source/core/core.vcxproj @@ -114,6 +114,7 @@ + @@ -215,7 +216,7 @@ Level3 Disabled true - CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions); + __CORE_WARNING_REPORTING__;CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions); true @@ -234,7 +235,7 @@ Level3 Disabled true - CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + __CORE_WARNING_REPORTING__;CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true $(WindowsPath) true @@ -254,7 +255,7 @@ true true true - CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;IN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + __CORE_WARNING_REPORTING__;CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;IN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -277,7 +278,7 @@ true true true - CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + __CORE_WARNING_REPORTING__;CORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true diff --git a/Source/core/core.vcxproj.filters b/Source/core/core.vcxproj.filters index 84e4fd723..728efbf91 100644 --- a/Source/core/core.vcxproj.filters +++ b/Source/core/core.vcxproj.filters @@ -362,5 +362,8 @@ Source Files + + Source Files + \ No newline at end of file