From cd568605c778b3ce04f2e1e303a3cb85a1e34dc7 Mon Sep 17 00:00:00 2001 From: Michael Kuron <mkuron@icp.uni-stuttgart.de> Date: Wed, 21 Feb 2018 15:26:57 +0100 Subject: [PATCH] Don't link boost libraries if we don't need them --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38b577851..0586465a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -701,8 +701,10 @@ if ( Boost_FOUND ) else() include_directories ( SYSTEM ${Boost_INCLUDE_DIRS} ) endif() - link_directories ( ${Boost_LIBRARY_DIRS} ) - list ( APPEND SERVICE_LIBS ${Boost_LIBRARIES} ) + if( waLBerla_REQUIRED_BOOST_COMPONENTS ) + link_directories ( ${Boost_LIBRARY_DIRS} ) + list ( APPEND SERVICE_LIBS ${Boost_LIBRARIES} ) + endif() add_definitions ( -DBOOST_ALL_NO_LIB ) # Disable Boost auto-linking (CMAKE does that for us...) #fix for static lib usage: http://stackoverflow.com/questions/11812463/boost-python-link-errors-under-windows-msvc10 -- GitLab