]> granicus.if.org Git - json-c/commitdiff
Fix test_util_file for VS2013 too, but skip all the tests for anything older than...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Sun, 24 Nov 2019 04:55:04 +0000 (23:55 -0500)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Sun, 24 Nov 2019 04:55:04 +0000 (23:55 -0500)
CMakeLists.txt
tests/test_util_file.c

index 48de72aeef9e93ac539350a1abd1235d2788fb1e..b70ad1ec5efd272956c69737967b3b6ab787ae25 100644 (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()
 
index 65be9b93c7a03fe9d6b3804d75298d736d45ecf9..3cc246d29138bd601edf218bb6adbdeb1d35fa0b 100644 (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);