Use -DBOOST_ALL_NO_LIB on Windows (disable autolinking).

This commit is contained in:
Ryan Curtin
2018-10-30 22:29:07 -04:00
parent f3b237936e
commit 3b95e90555
+2 -4
View File
@@ -325,12 +325,10 @@ find_package(Boost 1.49
link_directories(${Boost_LIBRARY_DIRS})
# In Visual Studio, automatic linking is performed, so we don't need to worry
# about it. Clear the list of libraries to link against and let Visual Studio
# handle it.
# Disable automatic linking in Visual Studio.
if (MSVC)
link_directories(${Boost_LIBRARY_DIRS})
set(Boost_LIBRARIES "")
add_definitions(-DBOOST_ALL_NO_LIB)
endif ()
set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})