Skip to content

Commit b5c6d19

Browse files
author
muhua.gmh
committed
Fixed multithread problem
the boost::spirit grammar object is not thread safe without -DBOOST_SPIRIT_THREADSAFE see https://groups.google.com/forum/#!topic/cpp-netlib/yqa5Qtpc1j4
1 parent 413f099 commit b5c6d19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/network/src/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ file(GLOB_RECURSE CPP-NETLIB_HEADERS
1212
"${CPP-NETLIB_SOURCE_DIR}/boost/" "*.hpp")
1313

1414
set(CPP-NETLIB_URI_SRCS uri/uri.cpp uri/schemes.cpp)
15+
add_definitions("-DBOOST_SPIRIT_THREADSAFE")
1516
add_library(cppnetlib-uri ${CPP-NETLIB_URI_SRCS})
1617
set_target_properties(cppnetlib-uri
1718
PROPERTIES VERSION ${CPPNETLIB_VERSION_STRING}

0 commit comments

Comments
 (0)