Commit 2739ea9a authored by Dominik Charousset's avatar Dominik Charousset

disable context switching for boost >= 1.54

libcppa no longer supports Boost.Coroutines due to its ridiculously unstable API
parent af56c6ee
......@@ -212,17 +212,22 @@ else (DISABLE_CONTEXT_SWITCHING)
if (NOT Boost_FOUND)
set(DISABLE_CONTEXT_SWITCHING true)
else (NOT Boost_FOUND)
# This hack fixes a problem when the linker search path is the same as
# the one provided by the compiler. In this case, CMake replaces the absolute
# path (e.g., /path/to/lib.so) with -l<lib>, which may cause it to pick up the wrong
# library. So when this replacement happens, we ensure that the right
# library gets picked by adding a -L directive for the affected libraries
# (which is just Boost Context here).
set(CMAKE_EXE_LINKER_FLAGS -L${Boost_LIBRARY_DIRS})
set(INCLUDE_DIRS ${INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
set(LD_DIRS ${LD_DIRS} ${Boost_LIBRARY_DIRS})
set(LD_FLAGS ${LD_FLAGS} ${Boost_CONTEXT_LIBRARY})
set(DISABLE_CONTEXT_SWITCHING false)
if (${Boost_VERSION} LESS 105400)
# This hack fixes a problem when the linker search path is the same as
# the one provided by the compiler. In this case, CMake replaces the absolute
# path (e.g., /path/to/lib.so) with -l<lib>, which may cause it to pick up the wrong
# library. So when this replacement happens, we ensure that the right
# library gets picked by adding a -L directive for the affected libraries
# (which is just Boost Context here).
set(CMAKE_EXE_LINKER_FLAGS -L${Boost_LIBRARY_DIRS})
set(INCLUDE_DIRS ${INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
set(LD_DIRS ${LD_DIRS} ${Boost_LIBRARY_DIRS})
set(LD_FLAGS ${LD_FLAGS} ${Boost_CONTEXT_LIBRARY})
set(DISABLE_CONTEXT_SWITCHING false)
else ()
message(WARNING "Boost >= 1.54 is not supported due the unstable API of Boost.Coroutines")
set(DISABLE_CONTEXT_SWITCHING true)
endif ()
endif (NOT Boost_FOUND)
endif (DISABLE_CONTEXT_SWITCHING)
......
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