Fix test_util_file for VS2013 too, but skip all the tests for anything older than that because the limitations are too inconvenient.

This commit is contained in:
Eric Haszlakiewicz
2019-11-23 23:55:04 -05:00
parent b99be9cf4e
commit 41f434e89f
2 changed files with 4 additions and 1 deletions

View File

@@ -21,7 +21,9 @@ endif()
include(CTest)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND
(NOT MSVC OR NOT (MSVC_VERSION LESS 1800)) # Tests need at least VS2013
)
add_subdirectory(tests)
endif()

View File

@@ -19,6 +19,7 @@
#include "json.h"
#include "json_util.h"
#include "snprintf_compat.h"
static void test_read_valid_with_fd(const char *testdir);
static void test_read_valid_nested_with_fd(const char *testdir);