Fix build errors on MSVC 2013

This commit is contained in:
Zeex 2017-10-28 04:32:55 +06:00
parent 237d89e7e4
commit b962246ad5
2 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,7 @@ configuration:
- RelWithDebInfo
before_build:
- cmake -G "Visual Studio 14 2015" source/compiler -DCPACK_GENERATOR=ZIP
- cmake -G "Visual Studio 12 2013" source/compiler -DCPACK_GENERATOR=ZIP
build_script:
- cmake --build . --config %CONFIGURATION%

View File

@ -45,7 +45,11 @@ if(HAVE_STRLCAT)
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS /J)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE /J)
if(MSVC LESS 1900)
# MSVC 2013 and below don't support the "inline" keyword
add_definitions(-Dinline=__inline)
endif()
endif()
if(UNIX)