1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fix CMake MSVS build problem (#366)

* Fix CMake MSVS 2015 boost linking problem
Same errors as here when building vcmi client and server: https://stackoverflow.com/questions/27196312/boost-1-57-0-program-options-msvs-2013-linker-error
Fix based on: https://groups.google.com/forum/#!topic/boost-list/Lhqvoet8N18

* Compile fix for VS 2017.3 due to incompatibility with variadic templates in Boost

https://developercommunity.visualstudio.com/content/problem/69009/compilation-error-on-msvc2015-on-boostbase-from-me.html
This commit is contained in:
Dydzio 2017-08-18 22:11:11 +02:00 committed by ArseniyShestakov
parent c7fbbb1248
commit 906bd7fc71
2 changed files with 2 additions and 1 deletions

View File

@ -132,6 +132,7 @@ if(WIN32)
if(MSVC)
add_definitions(-DBOOST_ALL_NO_LIB)
add_definitions(-DBOOST_ALL_DYN_LINK)
set(Boost_USE_STATIC_LIBS OFF)
# Don't link with SDLMain

View File

@ -154,7 +154,7 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
#define BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE 1
#define BOOST_BIND_NO_PLACEHOLDERS
#if defined(_MSC_VER) && (_MSC_VER == 1900 || _MSC_VER == 1910)
#if defined(_MSC_VER) && (_MSC_VER == 1900 || _MSC_VER == 1910 || _MSC_VER == 1911)
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES //Variadic templates are buggy in VS2015 and VS2017, so turn this off to avoid compile errors
#endif