File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ if (ENABLE_SHARED_STACK)
1919 add_definitions (-DENABLE_SHARED_STACK)
2020endif ()
2121
22+ # 选项互斥检查
2223if (UNIX )
2324 # unix like platforms
2425 aux_source_directory (${PROJECT_SOURCE_DIR} /src/linux CO_SRC_LIST)
@@ -31,6 +32,10 @@ if (UNIX)
3132 set (CXX_FLAGS_POSTFIX "-fsplit-stack -DBOOST_USE_SEGMENTED_STACKS" )
3233 set (TEST_LINK_FLAGS "-fuse-ld=gold" )
3334 endif ()
35+
36+ if (ENABLE_SHARED_STACK)
37+ message (FATAL_ERROR "ENABLE_SHARED_STACK cannot used with ENABLE_BOOST_COROUTINE" )
38+ endif ()
3439 else ()
3540 aux_source_directory (${PROJECT_SOURCE_DIR} /src/ctx_ucontext CO_SRC_LIST)
3641 if (ENABLE_SEGMENTED_STACK)
@@ -53,10 +58,15 @@ elseif (WIN32)
5358
5459 if (ENABLE_BOOST_COROUTINE)
5560 aux_source_directory (${PROJECT_SOURCE_DIR} /src/ctx_boost_coroutine CO_SRC_LIST)
61+ message (WARNING "boost.coroutine was unstable in windows platform" )
5662 else ()
5763 aux_source_directory (${PROJECT_SOURCE_DIR} /src/ctx_win_fiber CO_SRC_LIST)
5864 endif ()
5965
66+ if (ENABLE_SHARED_STACK)
67+ message (FATAL_ERROR "ENABLE_SHARED_STACK depends unix like platforms" )
68+ endif ()
69+
6070 if (ENABLE_SEGMENTED_STACK)
6171 message (FATAL_ERROR "ENABLE_SEGMENTED_STACK depends unix like platforms" )
6272 endif ()
You can’t perform that action at this time.
0 commit comments