v0.14.0
FindBoost.cmake
Go to the documentation of this file.
1 # Add BOOST directory
2 set(BOOST_ROOT "${BOOST_DIR}")
3 
4 find_package(
5  Boost
6  REQUIRED COMPONENTS
7  program_options log log_setup thread system filesystem
8  OPTIONAL_COMPONENTS
9  python
10  numpy
11 )
12 
13 message(STATUS "Boost_LIBRARIES ${Boost_LIBRARIES}")
14 message(STATUS "Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS}")
15 message(STATUS "Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}")
16 
17 if(NOT Boost_LIBRARIES)
18  message(FATAL_ERROR "boost libraries not found")
19 endif(NOT Boost_LIBRARIES)
20 
21 find_path(
22  BOOST_INCLUDE_DIR
23  NAMES boost/multi_index_container.hpp
24  HINTS
25  ${Boost_INCLUDE_DIRS}
26  ${BOOST_DIR}/include
27  ${PETSC_DIR}/${PETSC_ARCH}/include
28 )
29 message(STATUS "Boost include found: " ${BOOST_INCLUDE_DIR})
30 if(NOT BOOST_INCLUDE_DIR)
31  message(FATAL_ERROR "Boost include dir not found")
32 endif(NOT BOOST_INCLUDE_DIR)
33 include_directories(${BOOST_INCLUDE_DIR})
34 
35 add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
36 add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)