From bffad18f9c8fde81e8e9c2cf7c44f3e6d6992fc3 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 27 May 2016 11:25:50 +0200 Subject: [PATCH] #742 Added dependency to Boost --- CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e8fd24ce6..28281bd49b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,24 @@ endif() ################################################################################ include (ResInsightVersion.cmake) +################################################################################ +# Boost +################################################################################ + +# if we are building shared libraries ourselves, then don't include Boost in them +if (BUILD_SHARED_LIBS) + set(Boost_USE_STATIC_LIBS OFF) +elseif (DEFINED BUILD_SHARED_LIBS) + set(Boost_USE_STATIC_LIBS ON) +endif () +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) + + +# Requires BOOST filesystem version 3, thus 1.44 is necessary. +add_definitions(-DBOOST_FILESYSTEM_VERSION=3) +find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED) + ################################################################################ # ERT