Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Check for Boost
- set(BOOST_ROOT $ENV{BOOST_DIR} $ENV{BOOST_HOME})
- if (BOOST_ROOT)
- set(Boost_NO_SYSTEM_PATHS on)
- endif()
- # Prevent FindBoost.cmake from looking for system Boost{foo}.cmake
- # files
- set(Boost_NO_BOOST_CMAKE true)
- set(Boost_USE_MULTITHREADED $ENV{BOOST_USE_MULTITHREADED})
- find_package(Boost 1.48 QUIET REQUIRED)
- # Boost public/private libraries to link to.
- # Note: These should all be private as they do not appear in the
- # DOLFIN public interface , but there is a linking issues with older
- # Boost or CMake. Ubuntu 16.04 requires linking DOLFIN programs with
- # filesystem, whereas Ubuntu 16.10 and macOS (Homebrew) do not.
- if (Boost_VERSION VERSION_LESS 106100)
- set(DOLFIN_BOOST_COMPONENTS_PUBLIC filesystem)
- set(DOLFIN_BOOST_COMPONENTS_PRIVATE program_options iostreams timer)
- else()
- set(DOLFIN_BOOST_COMPONENTS_PUBLIC)
- set(DOLFIN_BOOST_COMPONENTS_PRIVATE filesystem program_options iostreams
- timer)
- endif()
- # Find required Boost libraries
- find_package(Boost COMPONENTS
- ${DOLFIN_BOOST_COMPONENTS_PUBLIC} ${DOLFIN_BOOST_COMPONENTS_PRIVATE} REQUIRED)
- set_package_properties(Boost PROPERTIES TYPE REQUIRED
- DESCRIPTION "Boost C++ libraries"
- URL "http://www.boost.org")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement