CodeCommitsIssuesPull requestsActionsInsightsSecurity
CLICKHOUSE-3749

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/find_boost.cmake

41lines · modecode

1option (USE_INTERNAL_BOOST_LIBRARY "Set to FALSE to use system boost library instead of bundled" ${NOT_UNBUNDLED})
2
3if (NOT USE_INTERNAL_BOOST_LIBRARY)
4 set (Boost_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
5 set (BOOST_ROOT "/usr/local")
6 find_package (Boost 1.60 COMPONENTS program_options system filesystem thread)
7 # incomplete, no include search, who use it?
8 if (NOT Boost_FOUND)
9 # # Try to find manually.
10 # set (BOOST_PATHS "")
11 # find_library (Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options PATHS ${BOOST_PATHS})
12 # find_library (Boost_SYSTEM_LIBRARY boost_system PATHS ${BOOST_PATHS})
13 # find_library (Boost_FILESYSTEM_LIBRARY boost_filesystem PATHS ${BOOST_PATHS})
14 # maybe found but incorrect version.
15 set (Boost_INCLUDE_DIRS "")
16 set (Boost_SYSTEM_LIBRARY "")
17 endif ()
18
19endif ()
20
21if (NOT Boost_SYSTEM_LIBRARY)
22 set (USE_INTERNAL_BOOST_LIBRARY 1)
23 set (Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options_internal)
24 set (Boost_SYSTEM_LIBRARY boost_system_internal)
25 set (Boost_FILESYSTEM_LIBRARY boost_filesystem_internal)
26
27 set (Boost_INCLUDE_DIRS)
28
29 # For boost from github:
30 file (GLOB Boost_INCLUDE_DIRS_ "${ClickHouse_SOURCE_DIR}/contrib/boost/libs/*/include")
31 list (APPEND Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS_})
32 # numeric has additional level
33 file (GLOB Boost_INCLUDE_DIRS_ "${ClickHouse_SOURCE_DIR}/contrib/boost/libs/numeric/*/include")
34 list (APPEND Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS_})
35
36 # For packaged version:
37 list (APPEND Boost_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/boost")
38
39endif ()
40
41message (STATUS "Using Boost: ${Boost_INCLUDE_DIRS} : ${Boost_PROGRAM_OPTIONS_LIBRARY},${Boost_SYSTEM_LIBRARY},${Boost_FILESYSTEM_LIBRARY}")