From a2edf8c05c4c543c8926cb454d2fb66cb5e8a0d8 Mon Sep 17 00:00:00 2001 From: degomme Date: Mon, 7 Mar 2016 10:35:00 +0100 Subject: [PATCH] Enable Boost contextes on Windows Detection fails on our test platform if we don't use static version --- CMakeLists.txt | 4 ++++ tools/cmake/MakeLibWin.cmake | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ef0d803a3..14db0b4bab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,10 @@ if(enable_ns3) endif() endif() +if(WIN32) + set(Boost_USE_STATIC_LIBS 1) +endif() + find_package(Boost 1.48) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) diff --git a/tools/cmake/MakeLibWin.cmake b/tools/cmake/MakeLibWin.cmake index 67bc91e97f..fdbafe327d 100644 --- a/tools/cmake/MakeLibWin.cmake +++ b/tools/cmake/MakeLibWin.cmake @@ -19,6 +19,9 @@ else() if (HAVE_PTHREAD) set(SIMGRID_DEP "${SIMGRID_DEP} -lpthread") endif() + if (HAVE_BOOST_CONTEXTS) + set(SIMGRID_DEP "${SIMGRID_DEP} ${Boost_CONTEXT_LIBRARY}") + endif() endif() target_link_libraries(simgrid ${SIMGRID_DEP}) -- 2.20.1