Skip to content

Commit 218c867

Browse files
committed
Disable failing VS2017 tests in cmake
1 parent beaa6a9 commit 218c867

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

.appveyor.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ build_script:
2525
test_script:
2626
- ctest --verbose --output-on-failure -C %Configuration%
2727

28-
# VS 2017 only: readme examples don't presently succeed, exclude
29-
for:
30-
- matrix:
31-
only:
32-
- image: Visual Studio 2017
33-
test_script:
34-
- ctest --verbose --output-on-failure -C %Configuration% -E readme
35-
3628
matrix:
3729
fast_finish: true
3830
exclude:

tests/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ target_link_libraries(parse_many_test simdjson-windows-headers)
4444
add_cpp_test(pointercheck pointercheck.cpp)
4545

4646
# Compile-only tests
47-
add_compile_test(readme_examples readme_examples.cpp TRUE)
48-
# Test that readme_examples does NOT compile when SIMDJSON_EXCEPTIONS=0 (i.e. test that the define
49-
# works even if exceptions are on)
50-
add_compile_test(readme_examples_will_fail_with_exceptions_off readme_examples.cpp FALSE)
51-
target_compile_definitions(readme_examples_will_fail_with_exceptions_off PRIVATE SIMDJSON_EXCEPTIONS=0)
47+
# Don't add the tests if we're on VS2017 or older; they don't succeed.
48+
if(NOT (MSVC AND MSVC_VERSION LESS 1920))
49+
add_compile_test(readme_examples readme_examples.cpp TRUE)
50+
# Test that readme_examples does NOT compile when SIMDJSON_EXCEPTIONS=0 (i.e. test that the define
51+
# works even if exceptions are on)
52+
add_compile_test(readme_examples_will_fail_with_exceptions_off readme_examples.cpp FALSE)
53+
target_compile_definitions(readme_examples_will_fail_with_exceptions_off PRIVATE SIMDJSON_EXCEPTIONS=0)
54+
endif()
5255

5356
if(MSVC)
5457
add_custom_command(TARGET basictests POST_BUILD # Adds a post-build event

0 commit comments

Comments
 (0)