8000 fix for issue 2373 (#2374) · simdjson/simdjson@16e390d · GitHub
[go: up one dir, main page]

Skip to content

Commit 16e390d

Browse files
authored
fix for issue 2373 (#2374)
* fix for issue 2373 * bumping google bench * removing json11 since dropbox retired it * removing json11 as a dependency
1 parent 8d34e14 commit 16e390d

File tree

6 files changed

+7
-23
lines changed

6 files changed

+7
-23
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ set_target_properties(
8484
)
8585

8686
# FIXME: Use proper CMake integration for exports
87-
if(MSVC AND BUILD_SHARED_LIBS)
87+
if(WIN32 AND BUILD_SHARED_LIBS)
8888
target_compile_definitions(
8989
simdjson
9090
PRIVATE SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY=1

dependencies/CMakeLists.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cmake_dependent_option(SIMDJSON_GOOGLE_BENCHMARKS "compile the Google Benchmark
1212
if(SIMDJSON_GOOGLE_BENCHMARKS)
1313
CPMAddPackage(
1414
NAME google_benchmarks
15-
URL https://github.com/google/benchmark/archive/refs/tags/v1.7.1.zip
15+
URL https://github.com/google/benchmark/archive/refs/tags/v1.9.4.zip
1616
OPTIONS
1717
"BENCHMARK_ENABLE_TESTING OFF"
1818
"BENCHMARK_ENABLE_INSTALL OFF"
@@ -98,14 +98,6 @@ int main() {}
9898

9999
set_property(TARGET nlohmann_json APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS SIMDJSON_COMPETITION_NLOHMANN_JSON)
100100

101-
CPMAddPackage(
102-
NAME json11
103-
URL https://github.com/dropbox/json11/archive/ec4e45219af1d7cde3d58b49ed762376fccf1ace.zip
104-
DOWNLOAD_ONLY YES
105-
)
106-
add_library(json11 STATIC "${json11_SOURCE_DIR}/json11.cpp")
107-
target_include_directories(json11 SYSTEM PUBLIC "${json11_SOURCE_DIR}")
108-
target_compile_definitions(json11 INTERFACE SIMDJSON_COMPETITION_JSON11)
109101

110102
set(jsoncpp_SOURCE_DIR "${simdjson_SOURCE_DIR}/dependencies/jsoncppdist")
111103
add_library(jsoncpp STATIC "${jsoncpp_SOURCE_DIR}/jsoncpp.cpp")
@@ -177,7 +169,7 @@ int main() {}
177169
endif()
178170

179171
add_library(competition-all INTERFACE)
180-
target_link_libraries(competition-all INTERFACE competition-core jsoncpp json11 fastjson gason ujson4c)
172+
target_link_libraries(competition-all INTERFACE competition-core jsoncpp fastjson gason ujson4c)
181173
endfunction()
182174

183175
if(SIMDJSON_COMPETITION)

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ add_cpp_test(minify_tests LABELS other acceptance per_implementation)
1313
add_cpp_test(padded_string_tests LABELS other acceptance )
1414
add_cpp_test(prettify_tests LABELS other acceptance per_implementation)
1515

16-
if(MSVC AND BUILD_SHARED_LIBS)
16+
if(WIN32 AND BUILD_SHARED_LIBS)
1717
# Copy the simdjson dll into the tests directory
1818
add_custom_command(TARGET unicode_tests POST_BUILD # Adds a post-build event
1919
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake -E copy_if_different..."

tests/dom/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ if(NOT (MSVC AND MSVC_VERSION LESS 1920))
114114
endif()
115115

116116

117-
if(MSVC AND BUILD_SHARED_LIBS)
117+
if(WIN32 AND BUILD_SHARED_LIBS)
118118
add_custom_command(TARGET basictests POST_BUILD # Adds a post-build event
119119
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake -E copy_if_different..."
120120
"$<TARGET_FILE:simdjson>" # <--this is in-file

tests/dom/allparserscheckfile.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
1212

1313
#include "gason.h"
1414

15-
#include "json11.hpp"
16-
1715
#include "rapidjson/document.h"
1816
#include "rapidjson/reader.h" // you have to check in the submodule
1917
#include "rapidjson/stringbuffer.h"
@@ -122,10 +120,6 @@ int main(int argc, char *argv[]) {
122120
return EXIT_SUCCESS;
123121
}
124122
bool rapid_correct = (d.Parse((const char *)buffer).HasParseError() == false);
125-
126-
std::string json11err;
127-
bool dropbox_correct = ((json11::Json::parse(buffer, json11err).is_null()) ||
128-
(!json11err.empty())) == false;
129123
bool fastjson_correct = fastjson_parse(buffer);
130124
JsonValue value;
131125
JsonAllocator allocator;
@@ -174,8 +168,6 @@ int main(int argc, char *argv[]) {
174168
rapid_correct_checkencoding ? "correct" : "invalid");
175169
printf("sajson : %s \n",
176170
sajson_correct ? "correct" : "invalid");
177-
printf("dropbox : %s \n",
178-
dropbox_correct ? "correct" : "invalid");
179171
printf("fastjson : %s \n",
180172
fastjson_correct ? "correct" : "invalid");
181173
printf("gason : %s \n",

tests/ondemand/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ if(HAVE_POSIX_FORK AND HAVE_POSIX_WAIT) # assert tests use fork and wait, which
4242
endif()
4343

4444
# Copy the simdjson dll into the tests directory
45-
if(MSVC AND BUILD_SHARED_LIBS)
45+
if(WIN32 AND BUILD_SHARED_LIBS)
4646
add_custom_command(TARGET ondemand_parse_api_tests POST_BUILD # Adds a post-build event
4747
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake -E copy_if_different..."
4848
"$<TARGET_FILE:s 43CA imdjson>" # <--this is in-file
4949
"$<TARGET_FILE_DIR:ondemand_parse_api_tests>") # <--this is out-file path
50-
endif(MSVC AND BUILD_SHARED_LIBS)
50+
endif(WIN32 AND BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)
0