Disable warning 4351 on MSVC 2013

pull/1469/head
Turo Lamminen 2017-10-02 13:08:20 +03:00
parent 003c728daf
commit b5db7d3649
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
ELSEIF(MSVC)
# enable multi-core compilation with MSVC
add_compile_options(/MP)
# disable "elements of array '' will be default initialized" warning on MSVC2013
IF(MSVC12)
add_compile_options(/wd4351)
ENDIF()
ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -Wno-long-long -std=c++11" )
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")