CMakeLists: Enable /W4 on MSVC

This commit is contained in:
MerryMage 2016-12-15 20:51:42 +00:00
parent 63caed7b09
commit 91e851a991
8 changed files with 15 additions and 2 deletions

View file

@ -26,9 +26,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
# Compiler flags
if (MSVC)
add_compile_options(/W3
add_compile_options(/W4
/w34263 # Non-virtual member function hides base class virtual function
/w34265 # Class has virtual functions, but destructor is not virtual
/w44265 # Class has virtual functions, but destructor is not virtual
/w34456 # Declaration of 'var' hides previous local declaration
/w34457 # Declaration of 'var' hides function parameter
/w34458 # Declaration of 'var' hides class member

View file

@ -54,6 +54,7 @@ using HostLocList = std::initializer_list<HostLoc>;
// RSP is preserved for function calls
// R15 contains the JitState pointer
#pragma warning (suppress : 4592) // Symbol will be dynamically initialized (implementation limitation)
const HostLocList any_gpr = {
HostLoc::RAX,
HostLoc::RBX,
@ -71,6 +72,7 @@ const HostLocList any_gpr = {
HostLoc::R14,
};
#pragma warning (suppress : 4592) // Symbol will be dynamically initialized (implementation limitation)
const HostLocList any_xmm = {
HostLoc::XMM0,
HostLoc::XMM1,

View file

@ -24,6 +24,7 @@ struct JitState {
std::array<u32, 16> Reg{}; // Current register file.
// TODO: Mode-specific register sets unimplemented.
#pragma warning (suppress : 4324) // Structure was padded due to alignment specifier
alignas(u64) std::array<u32, 64> ExtReg{}; // Extension registers.
std::array<u64, SpillCount> Spill{}; // Spill.

View file

@ -4,6 +4,8 @@
#define CITRA_IGNORE_EXIT(x)
#pragma warning(disable : 4244)
#include <algorithm>
#include <cstdio>

View file

@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma warning(disable : 4244)
#include <algorithm>
#include "common/assert.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"

View file

@ -20,6 +20,8 @@
/* Note: this file handles interface with arm core and vfp registers */
#pragma warning(disable : 4100)
#include "common/assert.h"
//#include "common/common_funcs.h"
#include "common/common_types.h"

View file

@ -51,6 +51,8 @@
* ===========================================================================
*/
#pragma warning(disable : 4100 4244 4245)
#include <algorithm>
//#include "common/logging/log.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp.h"

View file

@ -51,6 +51,8 @@
* ===========================================================================
*/
#pragma warning(disable : 4100 4244 4245)
#include <algorithm>
#include <cinttypes>
#include <common/assert.h>