Bladeren bron

Move MSVC warning suppression out of header and into CMake

Remove warning suppression of deprecated function.
Michael Ragazzon 1 maand geleden
bovenliggende
commit
30e59489c7
2 gewijzigde bestanden met toevoegingen van 1 en 10 verwijderingen
  1. 1 1
      CMake/Utilities.cmake
  2. 0 9
      Include/RmlUi/Core/Platform.h

+ 1 - 1
CMake/Utilities.cmake

@@ -105,7 +105,7 @@ function(set_common_target_options target)
 		if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
 		if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
 			target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic)
 			target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic)
 		elseif(MSVC)
 		elseif(MSVC)
-			target_compile_options(${target} PRIVATE /W4 /w44062 /permissive-)
+			target_compile_options(${target} PRIVATE /W4 /w44062 /wd4458 /wd4251 /permissive-)
 			target_compile_definitions(${target} PRIVATE _CRT_SECURE_NO_WARNINGS)
 			target_compile_definitions(${target} PRIVATE _CRT_SECURE_NO_WARNINGS)
 			if(CMAKE_GENERATOR MATCHES "Visual Studio")
 			if(CMAKE_GENERATOR MATCHES "Visual Studio")
 				target_compile_options(${target} PRIVATE /MP)
 				target_compile_options(${target} PRIVATE /MP)

+ 0 - 9
Include/RmlUi/Core/Platform.h

@@ -58,15 +58,6 @@
 
 
 #if defined(RMLUI_PLATFORM_WIN32) && !defined(__MINGW32__)
 #if defined(RMLUI_PLATFORM_WIN32) && !defined(__MINGW32__)
 	#define RMLUI_PLATFORM_WIN32_NATIVE
 	#define RMLUI_PLATFORM_WIN32_NATIVE
-
-	// declaration of 'identifier' hides class member
-	#pragma warning(disable : 4458)
-
-	// <type> needs to have dll-interface to be used by clients
-	#pragma warning(disable : 4251)
-
-	// <function> was declared deprecated
-	#pragma warning(disable : 4996)
 #endif
 #endif
 
 
 // Tell the compiler of printf-like functions, warns on incorrect usage.
 // Tell the compiler of printf-like functions, warns on incorrect usage.