mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Change cmake CTI_CONTINUABLE_WITH_AWAIT to CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE
This commit is contained in:
parent
9f881f83f0
commit
c702682e40
@ -37,7 +37,11 @@ option(CTI_CONTINUABLE_WITH_NO_EXCEPTIONS
|
|||||||
"Disable exception support"
|
"Disable exception support"
|
||||||
OFF)
|
OFF)
|
||||||
|
|
||||||
option(CTI_CONTINUABLE_WITH_AWAIT
|
option(CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS
|
||||||
|
"Enable unhandled asynchronous exceptions"
|
||||||
|
OFF)
|
||||||
|
|
||||||
|
option(CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE
|
||||||
"Enable co_await support"
|
"Enable co_await support"
|
||||||
OFF)
|
OFF)
|
||||||
|
|
||||||
@ -77,7 +81,7 @@ target_compile_features(continuable-base
|
|||||||
cxx_trailing_return_types
|
cxx_trailing_return_types
|
||||||
cxx_return_type_deduction)
|
cxx_return_type_deduction)
|
||||||
|
|
||||||
if (CTI_CONTINUABLE_WITH_AWAIT)
|
if (CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE)
|
||||||
target_compile_options(continuable-base
|
target_compile_options(continuable-base
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/await>
|
$<$<CXX_COMPILER_ID:MSVC>:/await>
|
||||||
@ -88,6 +92,12 @@ if (CTI_CONTINUABLE_WITH_AWAIT)
|
|||||||
-DCONTINUABLE_WITH_EXPERIMENTAL_COROUTINE)
|
-DCONTINUABLE_WITH_EXPERIMENTAL_COROUTINE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS)
|
||||||
|
target_compile_definitions(continuable-base
|
||||||
|
INTERFACE
|
||||||
|
-DCONTINUABLE_WITH_UNHANDLED_EXCEPTIONS)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(continuable INTERFACE)
|
add_library(continuable INTERFACE)
|
||||||
add_library(continuable::continuable ALIAS continuable)
|
add_library(continuable::continuable ALIAS continuable)
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ before_build:
|
|||||||
- cmd: >
|
- cmd: >
|
||||||
cmake -H. -Bbuild -A%PLATFORM%
|
cmake -H. -Bbuild -A%PLATFORM%
|
||||||
-DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=%WITH_NO_EXCEPTIONS%
|
-DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=%WITH_NO_EXCEPTIONS%
|
||||||
-DCTI_CONTINUABLE_WITH_AWAIT=ON
|
-DCTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE=ON
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: cmake --build build --config %CONFIGURATION% --target ALL_BUILD -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /verbosity:minimal /maxcpucount:2 /nologo
|
- cmd: cmake --build build --config %CONFIGURATION% --target ALL_BUILD -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /verbosity:minimal /maxcpucount:2 /nologo
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function renew_build {
|
|||||||
cd build
|
cd build
|
||||||
|
|
||||||
# Configure the project and build it
|
# Configure the project and build it
|
||||||
cmake -GNinja -DCMAKE_CXX_FLAGS="$STD_CXX_FLAGS $CMAKE_CXX_FLAGS -Werror" -DCMAKE_EXE_LINKER_FLAGS="$STD_LINKER_FLAGS" -DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=$WITH_NO_EXCEPTIONS -DCTI_CONTINUABLE_WITH_AWAIT=$WITH_AWAIT -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug ..
|
cmake -GNinja -DCMAKE_CXX_FLAGS="$STD_CXX_FLAGS $CMAKE_CXX_FLAGS -Werror" -DCMAKE_EXE_LINKER_FLAGS="$STD_LINKER_FLAGS" -DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=$WITH_NO_EXCEPTIONS -DCTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE=$WITH_AWAIT -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $CXX == *"clang"* ]]; then
|
if [[ $CXX == *"clang"* ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user