More changes to Visual Studio build process

Prevented incorrect linking to default libraries in Boost
Boost version updated to 1.74
This commit is contained in:
ahladik
2020-12-30 12:25:21 +01:00
committed by Thomas Krijnen
parent 6a8d8139ed
commit 824f09a1e7
3 changed files with 10 additions and 2 deletions
+8
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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%