mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-12-24 02:11:03 +00:00
Disable a few MSVC warnings
This commit is contained in:
parent
fe1b96a259
commit
6b1e8be121
@ -23,6 +23,44 @@ if(COMPILER_SUPPORTS_WPEDANTIC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
|
||||
endif()
|
||||
|
||||
# Disable some MSVC warnings
|
||||
if(MSVC)
|
||||
# conversion from 'double' to 'unsigned int', possible loss of data
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244")
|
||||
# conversion from 'int' to 'unsigned int', signed/unsigned mismatch
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4365")
|
||||
# layout of class may have changed from a previous version of the compiler
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4371")
|
||||
# enumerator in switch of enum is not explicitly handled by a case label
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4061")
|
||||
# unreferenced inline function has been removed
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4514")
|
||||
# constructor is not implicitly called
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4582")
|
||||
# destructor is not implicitly called
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4583")
|
||||
# pragma warning: there is no warning number <x>
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4619")
|
||||
# default constructor was implicitly defined as deleted
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4623")
|
||||
# copy constructor was implicitly defined as deleted
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4625")
|
||||
# assignment operator was implicitly defined as deleted
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4626")
|
||||
# move assignment operator was implicitly defined as deleted
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4627")
|
||||
# <X> is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4668")
|
||||
# function not inlined
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4710")
|
||||
# function selected for automatic inlining
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4711")
|
||||
# <x> bytes padding added after data member
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4820")
|
||||
# pragma warning(pop): likely mismatch, popping warning state pushed in different file
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd5031")
|
||||
endif()
|
||||
|
||||
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
|
||||
add_definitions(-DBOOST_TEST_DYN_LINK)
|
||||
add_definitions(-DUNITTEST_FRAMEWORK_LIBRARY_EXIST)
|
||||
|
Loading…
Reference in New Issue
Block a user