Also test MSVC with /std:c++latest

This commit is contained in:
Denis Blank 2018-03-12 09:29:33 +01:00
parent 6e6297194e
commit 7189068037
4 changed files with 23 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)