Added fallback to boost::regex if gcc version<4.9. Fixes #77
This commit is contained in:
parent
88a8b154e5
commit
8e0d3142bf
2 changed files with 23 additions and 7 deletions
|
|
@ -6,7 +6,15 @@ include_directories(.)
|
|||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(Boost 1.53.0 COMPONENTS system thread filesystem date_time REQUIRED)
|
||||
set(BOOST_COMPONENTS system thread filesystem date_time)
|
||||
# Late 2017 TODO: remove the following checks and always use std::regex
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} regex)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BOOST_REGEX")
|
||||
endif()
|
||||
endif()
|
||||
find_package(Boost 1.53.0 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
|
||||
|
||||
if(APPLE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue