Commits
Carles Fernandez authored and Michael Dickens committed ae7ebe71f9b
1 + | --- CMakeLists.txt.orig 2019-05-23 09:57:03.000000000 +0200 |
2 + | +++ CMakeLists.txt 2019-05-25 15:42:39.000000000 +0200 |
3 + | |
4 + | if(NOT Boost_FOUND) |
5 + | message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.") |
6 + | endif() |
7 + | - |
8 + | +if(${Boost_VERSION} VERSION_LESS 107000) |
9 + | + # Check if we have std::string_view |
10 + | + include(CheckCXXSourceCompiles) |
11 + | + check_cxx_source_compiles(" |
12 + | + #include <string_view> |
13 + | + int main() |
14 + | + { std::string_view sv; }" |
15 + | + has_string_view |
16 + | + ) |
17 + | + if(${has_string_view}) |
18 + | + add_definitions(-DBOOST_ASIO_HAS_STD_STRING_VIEW=1) |
19 + | + else() |
20 + | + add_definitions(-DBOOST_ASIO_HAS_STD_STRING_VIEW=0) |
21 + | + endif() |
22 + | +endif() |
23 + | |
24 + | |
25 + | ################################################################################ |