Skip to content

Commit

Permalink
option SEQUENTIAL_PARSE
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jul 24, 2023
1 parent e276cd4 commit 375dfac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ message(STATUS "C++ standard: ${CMAKE_CXX_STANDARD}")

add_definitions(-DTHROW_UNKNOWN_KEY)

option(ENABLE_SEQUENTIAL_PARSE "parse json sequential more efficient if the json fields sequences are the same with struct fields" OFF)
if (${ENABLE_SEQUENTIAL_PARSE})
ADD_DEFINITIONS(-DSEQUENTIAL_PARSE)
endif ()

option(HAS_RAPIDJSON "import rapidjson" OFF)
if (${HAS_RAPIDJSON})
add_definitions(-DHAS_RAPIDJSON)
Expand Down
1 change: 0 additions & 1 deletion benchmark/json_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define SEQUENTIAL_PARSE
#include "json_benchmark.h"

class ScopedTimer {
Expand Down

0 comments on commit 375dfac

Please sign in to comment.