diff --git a/CMakeLists.txt b/CMakeLists.txt index 48de72a..b70ad1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/tests/test_util_file.c b/tests/test_util_file.c index 65be9b9..3cc246d 100644 --- a/tests/test_util_file.c +++ b/tests/test_util_file.c @@ -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);