mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 08:46:44 +08:00
Also test MSVC with /std:c++latest
This commit is contained in:
parent
6e6297194e
commit
7189068037
@ -45,6 +45,10 @@ option(CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE
|
||||
"Enable co_await support"
|
||||
OFF)
|
||||
|
||||
option(CTI_CONTINUABLE_WITH_CPP_LATEST
|
||||
"Enable the highest C++ standard available for testing polyfills"
|
||||
OFF)
|
||||
|
||||
include(cmake/CMakeLists.txt)
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
@ -4,7 +4,11 @@ image:
|
||||
environment:
|
||||
matrix:
|
||||
- WITH_NO_EXCEPTIONS: OFF
|
||||
WITH_CPP_LATEST: OFF
|
||||
- WITH_NO_EXCEPTIONS: ON
|
||||
WITH_CPP_LATEST: OFF
|
||||
- WITH_NO_EXCEPTIONS: OFF
|
||||
WITH_CPP_LATEST: ON
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
@ -23,6 +27,7 @@ before_build:
|
||||
cmake -H. -Bbuild -A%PLATFORM%
|
||||
-DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=%WITH_NO_EXCEPTIONS%
|
||||
-DCTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE=ON
|
||||
-DCTI_CONTINUABLE_WITH_CPP_LATEST=ON
|
||||
|
||||
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
|
||||
|
||||
@ -41,6 +41,16 @@ target_compile_options(continuable-features-warnings
|
||||
INTERFACE
|
||||
/W4)
|
||||
|
||||
if (CTI_CONTINUABLE_WITH_CPP_LATEST)
|
||||
target_compile_options(continuable-features-flags
|
||||
INTERFACE
|
||||
/std:c++latest)
|
||||
else()
|
||||
target_compile_options(continuable-features-flags
|
||||
INTERFACE
|
||||
/std:c++14)
|
||||
endif()
|
||||
|
||||
if (CTI_CONTINUABLE_WITH_NO_EXCEPTIONS)
|
||||
target_compile_definitions(continuable-features-noexcept
|
||||
INTERFACE
|
||||
|
||||
@ -18,11 +18,10 @@ source_group(test FILES ${TEST})
|
||||
target_link_libraries(test-playground
|
||||
PRIVATE
|
||||
gtest
|
||||
continuable)
|
||||
|
||||
target_compile_definitions(test-playground
|
||||
PUBLIC
|
||||
-DCONTINUABLE_WITH_NO_EXCEPTIONS)
|
||||
continuable
|
||||
continuable-features-flags
|
||||
continuable-features-warnings
|
||||
continuable-features-noexcept)
|
||||
|
||||
add_test(NAME continuable-playground-tests
|
||||
COMMAND test-playground)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user