diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 02d192bd08..ee479c1599 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -143,6 +143,14 @@ IF(WIN32 AND ("$ENV{CONDA_BUILD}" STREQUAL "")) SET(Boost_USE_STATIC_LIBS ON) SET(Boost_USE_STATIC_RUNTIME ON) SET(Boost_USE_MULTITHREADED ON) + # Disable Boost's autolinking as the libraries to be linked to are supplied + # already by CMake, and wrong libraries would be asked for when code is + # compiled with a toolset different from default. + if(MSVC) + ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB) + # Necessary for boost version >= 1.67 + SET(BCRYPT_LIBRARIES "bcrypt.lib") + ENDIF() ELSE() # Disable Boost's autolinking as the libraries to be linked to are supplied # already by CMake, and it's going to conflict if there are multiple, as is diff --git a/win/build-deps.cmd b/win/build-deps.cmd index b2e75aff79..a9e54f43b8 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -172,7 +172,7 @@ cd "%DEPS_DIR%" :: by modifying this file and using goto. :Boost :: NOTE Boost < 1.64 doesn't work without tricks if the user has only VS 2017 installed and no earlier versions. -set BOOST_VERSION=1.71.0 +set BOOST_VERSION=1.74.0 :: Version string with underscores instead of dots. set BOOST_VER=%BOOST_VERSION:.=_% :: DEPENDENCY_NAME is used for logging and DEPENDENCY_DIR for saving from some redundant typing diff --git a/win/run-cmake.bat b/win/run-cmake.bat index eb2b597746..8964db5ab3 100755 --- a/win/run-cmake.bat +++ b/win/run-cmake.bat @@ -59,7 +59,7 @@ IF NOT EXIST ..\%BUILD_DIR%. mkdir ..\%BUILD_DIR% pushd ..\%BUILD_DIR% :: tfk: todo remove duplication -set BOOST_VERSION=1.71.0 +set BOOST_VERSION=1.74.0 set BOOST_VER=%BOOST_VERSION:.=_% set BOOST_ROOT=%DEPS_DIR%\boost_%BOOST_VER%