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" "Enable co_await support"
OFF) OFF)
option(CTI_CONTINUABLE_WITH_CPP_LATEST
"Enable the highest C++ standard available for testing polyfills"
OFF)
include(cmake/CMakeLists.txt) include(cmake/CMakeLists.txt)
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)

View File

@ -4,7 +4,11 @@ image:
environment: environment:
matrix: matrix:
- WITH_NO_EXCEPTIONS: OFF - WITH_NO_EXCEPTIONS: OFF
WITH_CPP_LATEST: OFF
- WITH_NO_EXCEPTIONS: ON - WITH_NO_EXCEPTIONS: ON
WITH_CPP_LATEST: OFF
- WITH_NO_EXCEPTIONS: OFF
WITH_CPP_LATEST: ON
configuration: configuration:
- Debug - Debug
@ -23,6 +27,7 @@ before_build:
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_EXPERIMENTAL_COROUTINE=ON -DCTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE=ON
-DCTI_CONTINUABLE_WITH_CPP_LATEST=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

View File

@ -41,6 +41,16 @@ target_compile_options(continuable-features-warnings
INTERFACE INTERFACE
/W4) /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) if (CTI_CONTINUABLE_WITH_NO_EXCEPTIONS)
target_compile_definitions(continuable-features-noexcept target_compile_definitions(continuable-features-noexcept
INTERFACE INTERFACE

View File

@ -18,11 +18,10 @@ source_group(test FILES ${TEST})
target_link_libraries(test-playground target_link_libraries(test-playground
PRIVATE PRIVATE
gtest gtest
continuable) continuable
continuable-features-flags
target_compile_definitions(test-playground continuable-features-warnings
PUBLIC continuable-features-noexcept)
-DCONTINUABLE_WITH_NO_EXCEPTIONS)
add_test(NAME continuable-playground-tests add_test(NAME continuable-playground-tests
COMMAND test-playground) COMMAND test-playground)