do not allow Python to re-define snprintf and vsnprintf for VS 2015 or above to fix build failure with boost 1.69 or later

This commit is contained in:
wmayer
2019-08-02 14:14:37 +02:00
parent 6ab7d261cc
commit 9873ec6d52

View File

@@ -46,6 +46,14 @@ endif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
# ================================================================================
# Needed for boost1.69
# Avoid that Python (pyerrors.h) defines snprintf and vsnprintf
if (MSVC AND NOT MSVC_VERSION VERSION_LESS 1900)
add_definitions(-DHAVE_SNPRINTF)
elseif (MINGW)
add_definitions(-DHAVE_SNPRINTF)
endif()
# Allow developers to use Boost < 1.48
if (NOT BOOST_MIN_VERSION)
set(BOOST_MIN_VERSION 1.48)