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