v0.15.0
Loading...
Searching...
No Matches
FindBoost.cmake
Go to the documentation of this file.
1# Add BOOST directory
2set(BOOST_ROOT "${BOOST_DIR}")
3
4find_package(
5 Boost
6 REQUIRED COMPONENTS
7 program_options log log_setup thread system filesystem
8 OPTIONAL_COMPONENTS
9 python
10 numpy
11)
12
13message(STATUS "Boost_LIBRARIES ${Boost_LIBRARIES}")
14message(STATUS "Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS}")
15message(STATUS "Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}")
16
17if(NOT Boost_LIBRARIES)
18 message(FATAL_ERROR "boost libraries not found")
19endif(NOT Boost_LIBRARIES)
20
21find_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)
29message(STATUS "Boost include found: " ${BOOST_INCLUDE_DIR})
30if(NOT BOOST_INCLUDE_DIR)
31 message(FATAL_ERROR "Boost include dir not found")
32endif(NOT BOOST_INCLUDE_DIR)
33include_directories(${BOOST_INCLUDE_DIR})
34
35add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
36add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)