Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2017
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. # Check for Boost
  2. set(BOOST_ROOT $ENV{BOOST_DIR} $ENV{BOOST_HOME})
  3. if (BOOST_ROOT)
  4. set(Boost_NO_SYSTEM_PATHS on)
  5. endif()
  6.  
  7. # Prevent FindBoost.cmake from looking for system Boost{foo}.cmake
  8. # files
  9. set(Boost_NO_BOOST_CMAKE true)
  10.  
  11. set(Boost_USE_MULTITHREADED $ENV{BOOST_USE_MULTITHREADED})
  12. find_package(Boost 1.48 QUIET REQUIRED)
  13.  
  14. # Boost public/private libraries to link to.
  15. # Note: These should all be private as they do not appear in the
  16. # DOLFIN public interface , but there is a linking issues with older
  17. # Boost or CMake. Ubuntu 16.04 requires linking DOLFIN programs with
  18. # filesystem, whereas Ubuntu 16.10 and macOS (Homebrew) do not.
  19. if (Boost_VERSION VERSION_LESS 106100)
  20. set(DOLFIN_BOOST_COMPONENTS_PUBLIC filesystem)
  21. set(DOLFIN_BOOST_COMPONENTS_PRIVATE program_options iostreams timer)
  22. else()
  23. set(DOLFIN_BOOST_COMPONENTS_PUBLIC)
  24. set(DOLFIN_BOOST_COMPONENTS_PRIVATE filesystem program_options iostreams
  25. timer)
  26. endif()
  27.  
  28. # Find required Boost libraries
  29. find_package(Boost COMPONENTS
  30. ${DOLFIN_BOOST_COMPONENTS_PUBLIC} ${DOLFIN_BOOST_COMPONENTS_PRIVATE} REQUIRED)
  31. set_package_properties(Boost PROPERTIES TYPE REQUIRED
  32. DESCRIPTION "Boost C++ libraries"
  33. URL "http://www.boost.org")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement