Commit b80bc20d by Maarten L. Hekkelman

Use system installed boost headers for regex, when available

parent 3a87eaa4
...@@ -134,7 +134,15 @@ if(GXX_LIBSTDCPP) ...@@ -134,7 +134,15 @@ if(GXX_LIBSTDCPP)
message(STATUS "You are probably trying to compile using the g++ standard library which contains a crashing std::regex implementation. Will try to use boost::regex instead") message(STATUS "You are probably trying to compile using the g++ standard library which contains a crashing std::regex implementation. Will try to use boost::regex instead")
set(BOOST_REGEX_STANDALONE ON) set(BOOST_REGEX_STANDALONE ON)
add_git_submodule(regex EXCLUDE_FROM_ALL)
find_package(Boost 1.77 COMPONENTS regex QUIET)
if(Boost_FOUND)
set(BOOST_REGEX_INCLUDE ${Boost_INCLUDE_DIRS})
else()
add_git_submodule(regex EXCLUDE_FROM_ALL)
set(BOOST_REGEX_INCLUDE regex/include)
endif()
endif() endif()
endif() endif()
...@@ -260,7 +268,7 @@ get_target_property(GXRIO_INCLUDE_DIR gxrio::gxrio INTERFACE_INCLUDE_DIRECTORIES ...@@ -260,7 +268,7 @@ get_target_property(GXRIO_INCLUDE_DIR gxrio::gxrio INTERFACE_INCLUDE_DIRECTORIES
target_include_directories(cifpp PRIVATE ${GXRIO_INCLUDE_DIR}) target_include_directories(cifpp PRIVATE ${GXRIO_INCLUDE_DIR})
if(BOOST_REGEX_STANDALONE) if(BOOST_REGEX_STANDALONE)
target_include_directories(cifpp PRIVATE regex/include) target_include_directories(cifpp PRIVATE ${BOOST_REGEX_INCLUDE})
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment