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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user