From d3e44b1108754348469feb431108d28cddedbfa8 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Fri, 17 Apr 2020 15:07:18 -0700 Subject: [PATCH] Add amalgamation support to cmake --- .dockerignore | 2 +- .drone.yml | 6 +- .gitignore | 5 + CMakeLists.txt | 16 +- HACKING.md | 4 +- Makefile | 13 +- jsonchecker/CMakeLists.txt | 3 + jsonexamples/CMakeLists.txt | 5 + singleheader/CMakeLists.txt | 21 ++ singleheader/README.md | 3 +- amalgamation.sh => singleheader/amalgamate.sh | 95 ++--- ...lgamation_demo.cpp => amalgamate_demo.cpp} | 8 +- singleheader/simdjson.cpp | 331 +++++++++--------- singleheader/simdjson.h | 90 ++--- src/CMakeLists.txt | 1 + tests/CMakeLists.txt | 1 - tools/release.py | 2 +- 17 files changed, 334 insertions(+), 272 deletions(-) create mode 100644 jsonchecker/CMakeLists.txt create mode 100644 jsonexamples/CMakeLists.txt create mode 100644 singleheader/CMakeLists.txt rename amalgamation.sh => singleheader/amalgamate.sh (63%) rename singleheader/{amalgamation_demo.cpp => amalgamate_demo.cpp} (79%) mode change 100755 => 100644 diff --git a/.dockerignore b/.dockerignore index 93f69eb35..60a69cf98 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,7 @@ * !.git !Makefile -!amalgamation.sh +!amalgamate.sh !benchmark !dependencies !include diff --git a/.drone.yml b/.drone.yml index 18ae4224f..2861be77e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,7 +47,7 @@ platform: steps: - name: build image: gcc:8 - commands: [ make, make amalgamate ] + commands: [ make, make amalgamate_test ] --- kind: pipeline name: x64-slowtests @@ -87,7 +87,7 @@ steps: image: gcc:8 environment: EXTRA_FLAGS: -fno-exceptions - commands: [ make, make amalgamate ] + commands: [ make, make amalgamate_test ] --- kind: pipeline name: x64-noexceptions-slowtests @@ -139,7 +139,7 @@ platform: steps: - name: build image: gcc:8 - commands: [ make, make amalgamate ] + commands: [ make, make amalgamate_test ] --- kind: pipeline name: arm64-slowtests diff --git a/.gitignore b/.gitignore index f7a687c89..1dd1436ba 100644 --- a/.gitignore +++ b/.gitignore @@ -133,6 +133,11 @@ objs /tests/allparserscheckfile /tests/basictests /tests/checkimplementation +/tests/compilation_failure_tests/dangling_parser_load_should_compile +/tests/compilation_failure_tests/dangling_parser_parse_padstring_should_compile +/tests/compilation_failure_tests/dangling_parser_parse_stdstring_should_compile +/tests/compilation_failure_tests/dangling_parser_parse_uchar_should_compile +/tests/compilation_failure_tests/dangling_parser_parse_uint8_should_compile /tests/compilation_failure_tests/example_compiletest_should_compile /tests/errortests /tests/extracting_values_example diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c9d070f..b4f9dc646 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,15 @@ if (NOT MSVC) add_custom_target(simdjson-user-cmakecache ALL DEPENDS ${SIMDJSON_USER_CMAKECACHE}) endif() +# +# Set up test data +# +enable_testing() +add_subdirectory(jsonchecker) +add_subdirectory(jsonexamples) +add_library(test-data INTERFACE) +target_link_libraries(test-data INTERFACE jsonchecker-data jsonexamples-data) + # # Create the top level simdjson library (must be done at this level to use both src/ and include/ # directories) and tools @@ -146,16 +155,11 @@ add_subdirectory(include) add_subdirectory(src) add_subdirectory(windows) add_subdirectory(tools) +add_subdirectory(singleheader) # # Compile tools / tests / benchmarks # -enable_testing() - -add_library(test-data INTERFACE) -target_compile_definitions(test-data INTERFACE SIMDJSON_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/jsonchecker/") -target_compile_definitions(test-data INTERFACE SIMDJSON_BENCHMARK_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/jsonexamples/") -set(EXAMPLE_JSON ${CMAKE_CURRENT_SOURCE_DIR}/jsonexamples/twitter.json) add_subdirectory(dependencies) add_subdirectory(tests) diff --git a/HACKING.md b/HACKING.md index b3455a3e2..01ec29a1b 100644 --- a/HACKING.md +++ b/HACKING.md @@ -37,7 +37,7 @@ Other important files and directories: * **.drone.yml:** Definitions for Drone CI. * **.appveyor.yml:** Definitions for Appveyor CI (Windows). * **.circleci:** Definitions for Circle CI. -* **amalgamation.sh:** Generates singleheader/simdjson.h and singleheader/simdjson.cpp for release. +* **amalgamate.sh:** Generates singleheader/simdjson.h and singleheader/simdjson.cpp for release. * **benchmark:** This is where we do benchmarking. Benchmarking is core to every change we make; the cardinal rule is don't regress performance without knowing exactly why, and what you're trading for it. If you're not sure what else to do to check your performance, this is always a good start: @@ -73,7 +73,7 @@ you can regenerate them by running this at the top level: make amalgamate ``` -The amalgamator is at `amalgamation.sh` at the top level. It generates singleheader/simdjson.h by +The amalgamator is at `amalgamate.sh` at the top level. It generates singleheader/simdjson.h by reading through include/simdjson.h, copy/pasting each header file into the amalgamated file at the point it gets included (but only once per header). singleheader/simdjson.cpp is generated from src/simdjson.cpp the same way, except files under generic/ may be included and copy/pasted multiple diff --git a/Makefile b/Makefile index 93b72d732..b44478bee 100644 --- a/Makefile +++ b/Makefile @@ -178,13 +178,16 @@ quicktests: run_basictests run_quickstart readme_examples readme_examples_noexce slowtests: run_testjson2json_sh run_issue150_sh amalgamate: - ./amalgamation.sh + singleheader/amalgamate.sh -singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamation_demo.cpp: amalgamation.sh src/simdjson.cpp $(SRCHEADERS) $(INCLUDEHEADERS) - ./amalgamation.sh +singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamate_demo.cpp: singleheader/amalgamate.sh src/simdjson.cpp $(SRCHEADERS) $(INCLUDEHEADERS) + singleheader/amalgamate.sh -singleheader/demo: singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamation_demo.cpp - $(CXX) $(CXXFLAGS) -o singleheader/demo singleheader/amalgamation_demo.cpp -Isingleheader +singleheader/demo: singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamate_demo.cpp + $(CXX) $(CXXFLAGS) -o singleheader/demo singleheader/amalgamate_demo.cpp -Isingleheader + +amalgamate_test: singleheader/demo jsonexamples/twitter.json jsonexamples/amazon_cellphones.ndjson + singleheader/demo jsonexamples/twitter.json jsonexamples/amazon_cellphones.ndjson submodules: -git submodule update --init --recursive diff --git a/jsonchecker/CMakeLists.txt b/jsonchecker/CMakeLists.txt new file mode 100644 index 000000000..a626d4acb --- /dev/null +++ b/jsonchecker/CMakeLists.txt @@ -0,0 +1,3 @@ +set(SIMDJSON_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) +add_library(jsonchecker-data INTERFACE) +target_compile_definitions(jsonchecker-data INTERFACE SIMDJSON_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/") diff --git a/jsonexamples/CMakeLists.txt b/jsonexamples/CMakeLists.txt new file mode 100644 index 000000000..98244342a --- /dev/null +++ b/jsonexamples/CMakeLists.txt @@ -0,0 +1,5 @@ +set(SIMDJSON_BENCHMARK_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) +set(EXAMPLE_JSON ${CMAKE_CURRENT_SOURCE_DIR}/twitter.json PARENT_SCOPE) +set(EXAMPLE_NDJSON ${CMAKE_CURRENT_SOURCE_DIR}/amazon_cellphones.ndjson PARENT_SCOPE) +add_library(jsonexamples-data INTERFACE) +target_compile_definitions(jsonexamples-data INTERFACE SIMDJSON_BENCHMARK_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/") diff --git a/singleheader/CMakeLists.txt b/singleheader/CMakeLists.txt new file mode 100644 index 000000000..2ab4f4b50 --- /dev/null +++ b/singleheader/CMakeLists.txt @@ -0,0 +1,21 @@ +# +# Amalgamation +# +if (NOT MSVC) + set(SINGLEHEADER_FILES simdjson.h simdjson.cpp amalgamate_demo.cpp README.md) + add_custom_command( + OUTPUT ${SINGLEHEADER_FILES} + COMMAND ${CMAKE_COMMAND} -E env + AMALGAMATE_SOURCE_PATH=${PROJECT_SOURCE_DIR}/src + AMALGAMATE_INPUT_PATH=${PROJECT_SOURCE_DIR}/include + AMALGAMATE_OUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/amalgamate.sh + DEPENDS simdjson-source amalgamate.sh + ) + + add_custom_target(amalgamate DEPENDS ${SINGLEHEADER_FILES}) + + add_executable(amalgamate_demo amalgamate_demo.cpp) + target_link_libraries(amalgamate_demo simdjson-include-source) + add_test(amalgamate_demo amalgamate_demo ${EXAMPLE_JSON} ${EXAMPLE_NDJSON}) +endif() \ No newline at end of file diff --git a/singleheader/README.md b/singleheader/README.md index 754861b76..fd58a7a4f 100755 --- a/singleheader/README.md +++ b/singleheader/README.md @@ -1 +1,2 @@ -c++ -O3 -std=c++17 -pthread -o amalgamation_demo amalgamation_demo.cpp && ./amalgamation_demo ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson +Try : +c++ -O3 -std=c++17 -pthread -o amalgamate_demo amalgamate_demo.cpp && ./amalgamate_demo ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson diff --git a/amalgamation.sh b/singleheader/amalgamate.sh similarity index 63% rename from amalgamation.sh rename to singleheader/amalgamate.sh index cb6d403c4..b03c12c7d 100755 --- a/amalgamation.sh +++ b/singleheader/amalgamate.sh @@ -3,16 +3,16 @@ # Generates an "amalgamation build" for roaring. Inspired by similar # script used by whefs. ######################################################################## +set -e + SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" echo "We are about to amalgamate all simdjson files into one source file. " echo "See https://www.sqlite.org/amalgamation.html and https://en.wikipedia.org/wiki/Single_Compilation_Unit for rationale. " -AMAL_H="simdjson.h" -AMAL_C="simdjson.cpp" - -SRCPATH="$SCRIPTPATH/src" -INCLUDEPATH="$SCRIPTPATH/include" +if [ -z "$AMALGAMATE_SOURCE_PATH" ]; then AMALGAMATE_SOURCE_PATH="$SCRIPTPATH/../src"; fi +if [ -z "$AMALGAMATE_INCLUDE_PATH" ]; then AMALGAMATE_INCLUDE_PATH="$SCRIPTPATH/../include"; fi +if [ -z "$AMALGAMATE_OUTPUT_PATH" ]; then AMALGAMATE_OUTPUT_PATH="$SCRIPTPATH"; fi # this list excludes the "src/generic headers" ALLCFILES=" @@ -27,14 +27,14 @@ simdjson.h found_includes=() for file in ${ALLCFILES}; do - test -e "$SRCPATH/$file" && continue - echo "FATAL: source file [$SRCPATH/$file] not found." + test -e "$AMALGAMATE_SOURCE_PATH/$file" && continue + echo "FATAL: source file [$AMALGAMATE_SOURCE_PATH/$file] not found." exit 127 done for file in ${ALLCHEADERS}; do - test -e "$INCLUDEPATH/$file" && continue - echo "FATAL: source file [$INCLUDEPATH/$file] not found." + test -e "$AMALGAMATE_INCLUDE_PATH/$file" && continue + echo "FATAL: source file [$AMALGAMATE_INCLUDE_PATH/$file] not found." exit 127 done @@ -42,18 +42,18 @@ function doinclude() { file=$1 line="${@:2}" - if [ -f $INCLUDEPATH/$file ]; then + if [ -f $AMALGAMATE_INCLUDE_PATH/$file ]; then if [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then found_includes+=("$file") - dofile $INCLUDEPATH/$file + dofile $AMALGAMATE_INCLUDE_PATH $file fi; - elif [ -f $SRCPATH/$file ]; then + elif [ -f $AMALGAMATE_SOURCE_PATH/$file ]; then # generic includes are included multiple times if [[ "${file}" == *'generic/'*'.h' ]]; then - dofile $SRCPATH/$file + dofile $AMALGAMATE_SOURCE_PATH $file elif [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then found_includes+=("$file") - dofile $SRCPATH/$file + dofile $AMALGAMATE_SOURCE_PATH $file else echo "/* $file already included: $line */" fi @@ -65,9 +65,9 @@ function doinclude() function dofile() { + file="$1/$2" # Last lines are always ignored. Files should end by an empty lines. - RELFILE=${1#"$SCRIPTPATH/"} - echo "/* begin file $RELFILE */" + echo "/* begin file ${2} */" # echo "#line 8 \"$1\"" ## redefining the line/file is not nearly as useful as it sounds for debugging. It breaks IDEs. while IFS= read -r line || [ -n "$line" ]; do @@ -84,23 +84,31 @@ function dofile() # Otherwise we simply copy the line echo "$line" fi - done < "$1" + done < "$file" echo "/* end file $RELFILE */" } + timestamp=$(date) +mkdir -p $AMALGAMATE_OUTPUT_PATH + +AMAL_H="${AMALGAMATE_OUTPUT_PATH}/simdjson.h" +AMAL_C="${AMALGAMATE_OUTPUT_PATH}/simdjson.cpp" +DEMOCPP="${AMALGAMATE_OUTPUT_PATH}/amalgamate_demo.cpp" +README="$AMALGAMATE_OUTPUT_PATH/README.md" + echo "Creating ${AMAL_H}..." -echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${AMAL_H}" +echo "/* auto-generated on ${timestamp}. Do not edit! */" > ${AMAL_H} { for h in ${ALLCHEADERS}; do doinclude $h "ERROR $h not found" done -} >> "${AMAL_H}" +} >> ${AMAL_H} echo "Creating ${AMAL_C}..." -echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${AMAL_C}" +echo "/* auto-generated on ${timestamp}. Do not edit! */" > ${AMAL_C} { - echo "#include \"${AMAL_H}\"" + echo "#include \"simdjson.h\"" echo "" echo "/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */" @@ -110,14 +118,13 @@ echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${AMAL_C}" echo "" for file in ${ALLCFILES}; do - dofile "$SRCPATH/$file" + dofile $AMALGAMATE_SOURCE_PATH $file done -} >> "${AMAL_C}" +} >> ${AMAL_C} -DEMOCPP="amalgamation_demo.cpp" echo "Creating ${DEMOCPP}..." -echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${DEMOCPP}" +echo "/* auto-generated on ${timestamp}. Do not edit! */" > ${DEMOCPP} cat <<< ' #include #include "simdjson.h" @@ -128,11 +135,14 @@ int main(int argc, char *argv[]) { } const char * filename = argv[1]; simdjson::dom::parser parser; - auto [doc, error] = parser.load(filename); // do the parsing + simdjson::error_code error; + UNUSED simdjson::dom::element elem; + parser.load(filename).tie(elem, error); // do the parsing if (error) { std::cout << "parse failed" << std::endl; std::cout << "error code: " << error << std::endl; std::cout << error << std::endl; + return EXIT_FAILURE; } else { std::cout << "parse valid" << std::endl; } @@ -149,34 +159,31 @@ int main(int argc, char *argv[]) { std::cout << "parse_many failed" << std::endl; std::cout << "error code: " << error << std::endl; std::cout << error << std::endl; + return EXIT_FAILURE; } else { std::cout << "parse_many valid" << std::endl; } return EXIT_SUCCESS; } -' >> "${DEMOCPP}" +' >> ${DEMOCPP} -echo "Done with all files generation. " +CPPBIN=$(basename ${DEMOCPP} .cpp) -echo "Files have been written to directory: $PWD " -ls -la ${AMAL_C} ${AMAL_H} ${DEMOCPP} +echo "Try :" > ${README} +echo "c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP##*/} && ./${CPPBIN##*/} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson" >> ${README} +echo "Done with all files generation." + +echo "Files have been written to directory: ${AMALGAMATE_OUTPUT_PATH}/" +ls -la ${AMAL_C} ${AMAL_H} ${DEMOCPP} ${README} + +# +# Instructions to create demo +# +echo "" echo "Giving final instructions:" - -CPPBIN=${DEMOCPP%%.*} - -echo "Try :" -echo "c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson" - -SINGLEHDR=$SCRIPTPATH/singleheader -echo "Copying files to $SCRIPTPATH/singleheader " -mkdir -p $SINGLEHDR -echo "c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson" > $SINGLEHDR/README.md -cp ${AMAL_C} ${AMAL_H} ${DEMOCPP} $SINGLEHDR -ls $SINGLEHDR - -cd $SINGLEHDR && c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson +cat ${README} lowercase(){ echo "$1" | tr 'A-Z' 'a-z' diff --git a/singleheader/amalgamation_demo.cpp b/singleheader/amalgamate_demo.cpp old mode 100755 new mode 100644 similarity index 79% rename from singleheader/amalgamation_demo.cpp rename to singleheader/amalgamate_demo.cpp index 8e68bf111..3898cdf9d --- a/singleheader/amalgamation_demo.cpp +++ b/singleheader/amalgamate_demo.cpp @@ -1,4 +1,4 @@ -/* auto-generated on Sun Apr 19 11:36:20 PDT 2020. Do not edit! */ +/* auto-generated on Mon Apr 20 11:05:12 PDT 2020. Do not edit! */ #include #include "simdjson.h" @@ -9,11 +9,14 @@ int main(int argc, char *argv[]) { } const char * filename = argv[1]; simdjson::dom::parser parser; - auto [doc, error] = parser.load(filename); // do the parsing + simdjson::error_code error; + UNUSED simdjson::dom::element elem; + parser.load(filename).tie(elem, error); // do the parsing if (error) { std::cout << "parse failed" << std::endl; std::cout << "error code: " << error << std::endl; std::cout << error << std::endl; + return EXIT_FAILURE; } else { std::cout << "parse valid" << std::endl; } @@ -30,6 +33,7 @@ int main(int argc, char *argv[]) { std::cout << "parse_many failed" << std::endl; std::cout << "error code: " << error << std::endl; std::cout << error << std::endl; + return EXIT_FAILURE; } else { std::cout << "parse_many valid" << std::endl; } diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index 2922a8ce9..39baba3b0 100644 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,4 +1,4 @@ -/* auto-generated on Sun Apr 19 11:36:20 PDT 2020. Do not edit! */ +/* auto-generated on Mon Apr 20 11:05:12 PDT 2020. Do not edit! */ #include "simdjson.h" /* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */ @@ -6,8 +6,8 @@ #include "dmalloc.h" #endif -/* begin file src/simdjson.cpp */ -/* begin file src/error.cpp */ +/* begin file simdjson.cpp */ +/* begin file error.cpp */ namespace simdjson { namespace internal { @@ -42,9 +42,9 @@ namespace internal { } // namespace internal } // namespace simdjson -/* end file src/error.cpp */ -/* begin file src/implementation.cpp */ -/* begin file src/isadetection.h */ +/* end file */ +/* begin file implementation.cpp */ +/* begin file isadetection.h */ /* From https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h Highly modified. @@ -198,8 +198,8 @@ static inline uint32_t detect_supported_architectures() { } // namespace simdjson #endif // SIMDJSON_ISADETECTION_H -/* end file src/isadetection.h */ -/* begin file src/simdprune_tables.h */ +/* end file */ +/* begin file simdprune_tables.h */ #ifndef SIMDJSON_SIMDPRUNE_TABLES_H #define SIMDJSON_SIMDPRUNE_TABLES_H #include @@ -330,7 +330,7 @@ static const uint64_t thintable_epi8[256] = { } // namespace simdjson #endif // SIMDJSON_SIMDPRUNE_TABLES_H -/* end file src/simdprune_tables.h */ +/* end file */ #include @@ -338,7 +338,7 @@ static const uint64_t thintable_epi8[256] = { // without requiring a static initializer. #if SIMDJSON_IMPLEMENTATION_HASWELL -/* begin file src/haswell/implementation.h */ +/* begin file haswell/implementation.h */ #ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H #define SIMDJSON_HASWELL_IMPLEMENTATION_H @@ -367,12 +367,12 @@ public: } // namespace simdjson #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H -/* end file src/haswell/implementation.h */ +/* end file */ namespace simdjson { namespace internal { const haswell::implementation haswell_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_HASWELL #if SIMDJSON_IMPLEMENTATION_WESTMERE -/* begin file src/westmere/implementation.h */ +/* begin file westmere/implementation.h */ #ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H #define SIMDJSON_WESTMERE_IMPLEMENTATION_H @@ -397,12 +397,12 @@ public: } // namespace simdjson #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H -/* end file src/westmere/implementation.h */ +/* end file */ namespace simdjson { namespace internal { const westmere::implementation westmere_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_WESTMERE #if SIMDJSON_IMPLEMENTATION_ARM64 -/* begin file src/arm64/implementation.h */ +/* begin file arm64/implementation.h */ #ifndef SIMDJSON_ARM64_IMPLEMENTATION_H #define SIMDJSON_ARM64_IMPLEMENTATION_H @@ -427,12 +427,12 @@ public: } // namespace simdjson #endif // SIMDJSON_ARM64_IMPLEMENTATION_H -/* end file src/arm64/implementation.h */ +/* end file */ namespace simdjson { namespace internal { const arm64::implementation arm64_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_ARM64 #if SIMDJSON_IMPLEMENTATION_FALLBACK -/* begin file src/fallback/implementation.h */ +/* begin file fallback/implementation.h */ #ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H #define SIMDJSON_FALLBACK_IMPLEMENTATION_H @@ -462,7 +462,7 @@ public: } // namespace simdjson #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H -/* end file src/fallback/implementation.h */ +/* end file */ namespace simdjson { namespace internal { const fallback::implementation fallback_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_FALLBACK @@ -561,6 +561,15 @@ const implementation *available_implementation_list::detect_best_supported() con } const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept { + char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION"); + if (force_implementation_name) { + auto force_implementation = available_implementations[force_implementation_name]; + if (!force_implementation) { + fprintf(stderr, "SIMDJSON_FORCE_IMPLEMENTATION environment variable set to '%s', which is not a supported implementation name!\n", force_implementation_name); + abort(); + } + return active_implementation = force_implementation; + } return active_implementation = available_implementations.detect_best_supported(); } @@ -570,19 +579,19 @@ SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list available SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr active_implementation{&internal::detect_best_supported_implementation_on_first_use_singleton}; } // namespace simdjson -/* end file src/fallback/implementation.h */ -/* begin file src/stage1_find_marks.cpp */ +/* end file */ +/* begin file stage1_find_marks.cpp */ #if SIMDJSON_IMPLEMENTATION_ARM64 -/* begin file src/arm64/stage1_find_marks.h */ +/* begin file arm64/stage1_find_marks.h */ #ifndef SIMDJSON_ARM64_STAGE1_FIND_MARKS_H #define SIMDJSON_ARM64_STAGE1_FIND_MARKS_H -/* begin file src/arm64/bitmask.h */ +/* begin file arm64/bitmask.h */ #ifndef SIMDJSON_ARM64_BITMASK_H #define SIMDJSON_ARM64_BITMASK_H -/* begin file src/arm64/intrinsics.h */ +/* begin file arm64/intrinsics.h */ #ifndef SIMDJSON_ARM64_INTRINSICS_H #define SIMDJSON_ARM64_INTRINSICS_H @@ -592,7 +601,7 @@ SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr active_imple #include #endif // SIMDJSON_ARM64_INTRINSICS_H -/* end file src/arm64/intrinsics.h */ +/* end file */ namespace simdjson { namespace arm64 { @@ -630,13 +639,13 @@ really_inline uint64_t prefix_xor(uint64_t bitmask) { UNTARGET_REGION #endif -/* end file src/arm64/intrinsics.h */ -/* begin file src/arm64/simd.h */ +/* end file */ +/* begin file arm64/simd.h */ #ifndef SIMDJSON_ARM64_SIMD_H #define SIMDJSON_ARM64_SIMD_H /* simdprune_tables.h already included: #include "simdprune_tables.h" */ -/* begin file src/arm64/bitmanipulation.h */ +/* begin file arm64/bitmanipulation.h */ #ifndef SIMDJSON_ARM64_BITMANIPULATION_H #define SIMDJSON_ARM64_BITMANIPULATION_H @@ -716,7 +725,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *resu } // namespace simdjson #endif // SIMDJSON_ARM64_BITMANIPULATION_H -/* end file src/arm64/bitmanipulation.h */ +/* end file */ /* arm64/intrinsics.h already included: #include "arm64/intrinsics.h" */ namespace simdjson { @@ -1107,7 +1116,7 @@ namespace simd { } // namespace simdjson #endif // SIMDJSON_ARM64_SIMD_H -/* end file src/arm64/bitmanipulation.h */ +/* end file */ /* arm64/bitmanipulation.h already included: #include "arm64/bitmanipulation.h" */ /* arm64/implementation.h already included: #include "arm64/implementation.h" */ @@ -1175,7 +1184,7 @@ really_inline simd8 must_be_continuation(simd8 prev1, simd8 struct buf_block_reader { @@ -1224,8 +1233,8 @@ UNUSED static char * format_mask(uint64_t mask) { buf[64] = '\0'; return buf; } -/* end file src/generic/buf_block_reader.h */ -/* begin file src/generic/json_string_scanner.h */ +/* end file */ +/* begin file generic/json_string_scanner.h */ namespace stage1 { struct json_string_block { @@ -1353,8 +1362,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file src/generic/json_string_scanner.h */ -/* begin file src/generic/json_scanner.h */ +/* end file */ +/* begin file generic/json_scanner.h */ namespace stage1 { /** @@ -1458,9 +1467,9 @@ really_inline error_code json_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file src/generic/json_scanner.h */ +/* end file */ -/* begin file src/generic/json_minifier.h */ +/* begin file generic/json_minifier.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -1534,12 +1543,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } } // namespace stage1 -/* end file src/generic/json_minifier.h */ +/* end file */ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { return arm64::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); } -/* begin file src/generic/utf8_lookup2_algorithm.h */ +/* begin file generic/utf8_lookup2_algorithm.h */ // // Detect Unicode errors. // @@ -1965,8 +1974,8 @@ namespace utf8_validation { } using utf8_validation::utf8_checker; -/* end file src/generic/utf8_lookup2_algorithm.h */ -/* begin file src/generic/json_structural_indexer.h */ +/* end file */ +/* begin file generic/json_structural_indexer.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -2142,7 +2151,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser } } // namespace stage1 -/* end file src/generic/json_structural_indexer.h */ +/* end file */ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { return arm64::stage1::json_structural_indexer::index<64>(buf, len, parser, streaming); } @@ -2151,10 +2160,10 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa } // namespace simdjson #endif // SIMDJSON_ARM64_STAGE1_FIND_MARKS_H -/* end file src/generic/json_structural_indexer.h */ +/* end file */ #endif #if SIMDJSON_IMPLEMENTATION_FALLBACK -/* begin file src/fallback/stage1_find_marks.h */ +/* begin file fallback/stage1_find_marks.h */ #ifndef SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H #define SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H @@ -2368,20 +2377,20 @@ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, ui } // namespace simdjson #endif // SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H -/* end file src/fallback/stage1_find_marks.h */ +/* end file */ #endif #if SIMDJSON_IMPLEMENTATION_HASWELL -/* begin file src/haswell/stage1_find_marks.h */ +/* begin file haswell/stage1_find_marks.h */ #ifndef SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H #define SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H -/* begin file src/haswell/bitmask.h */ +/* begin file haswell/bitmask.h */ #ifndef SIMDJSON_HASWELL_BITMASK_H #define SIMDJSON_HASWELL_BITMASK_H -/* begin file src/haswell/intrinsics.h */ +/* begin file haswell/intrinsics.h */ #ifndef SIMDJSON_HASWELL_INTRINSICS_H #define SIMDJSON_HASWELL_INTRINSICS_H @@ -2393,7 +2402,7 @@ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, ui #endif // _MSC_VER #endif // SIMDJSON_HASWELL_INTRINSICS_H -/* end file src/haswell/intrinsics.h */ +/* end file */ TARGET_HASWELL namespace simdjson { @@ -2418,13 +2427,13 @@ really_inline uint64_t prefix_xor(const uint64_t bitmask) { UNTARGET_REGION #endif // SIMDJSON_HASWELL_BITMASK_H -/* end file src/haswell/intrinsics.h */ -/* begin file src/haswell/simd.h */ +/* end file */ +/* begin file haswell/simd.h */ #ifndef SIMDJSON_HASWELL_SIMD_H #define SIMDJSON_HASWELL_SIMD_H /* simdprune_tables.h already included: #include "simdprune_tables.h" */ -/* begin file src/haswell/bitmanipulation.h */ +/* begin file haswell/bitmanipulation.h */ #ifndef SIMDJSON_HASWELL_BITMANIPULATION_H #define SIMDJSON_HASWELL_BITMANIPULATION_H @@ -2502,7 +2511,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, UNTARGET_REGION #endif // SIMDJSON_HASWELL_BITMANIPULATION_H -/* end file src/haswell/bitmanipulation.h */ +/* end file */ /* haswell/intrinsics.h already included: #include "haswell/intrinsics.h" */ TARGET_HASWELL @@ -2874,7 +2883,7 @@ namespace simd { UNTARGET_REGION #endif // SIMDJSON_HASWELL_SIMD_H -/* end file src/haswell/bitmanipulation.h */ +/* end file */ /* haswell/bitmanipulation.h already included: #include "haswell/bitmanipulation.h" */ /* haswell/implementation.h already included: #include "haswell/implementation.h" */ @@ -2930,7 +2939,7 @@ really_inline simd8 must_be_continuation(simd8 prev1, simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); } -/* begin file src/generic/buf_block_reader.h */ +/* begin file generic/buf_block_reader.h */ // Walks through a buffer in block-sized increments, loading the last part with spaces template struct buf_block_reader { @@ -2979,8 +2988,8 @@ UNUSED static char * format_mask(uint64_t mask) { buf[64] = '\0'; return buf; } -/* end file src/generic/buf_block_reader.h */ -/* begin file src/generic/json_string_scanner.h */ +/* end file */ +/* begin file generic/json_string_scanner.h */ namespace stage1 { struct json_string_block { @@ -3108,8 +3117,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file src/generic/json_string_scanner.h */ -/* begin file src/generic/json_scanner.h */ +/* end file */ +/* begin file generic/json_scanner.h */ namespace stage1 { /** @@ -3213,9 +3222,9 @@ really_inline error_code json_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file src/generic/json_scanner.h */ +/* end file */ -/* begin file src/generic/json_minifier.h */ +/* begin file generic/json_minifier.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -3289,12 +3298,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } } // namespace stage1 -/* end file src/generic/json_minifier.h */ +/* end file */ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { return haswell::stage1::json_minifier::minify<128>(buf, len, dst, dst_len); } -/* begin file src/generic/utf8_lookup2_algorithm.h */ +/* begin file generic/utf8_lookup2_algorithm.h */ // // Detect Unicode errors. // @@ -3720,8 +3729,8 @@ namespace utf8_validation { } using utf8_validation::utf8_checker; -/* end file src/generic/utf8_lookup2_algorithm.h */ -/* begin file src/generic/json_structural_indexer.h */ +/* end file */ +/* begin file generic/json_structural_indexer.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -3897,7 +3906,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser } } // namespace stage1 -/* end file src/generic/json_structural_indexer.h */ +/* end file */ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { return haswell::stage1::json_structural_indexer::index<128>(buf, len, parser, streaming); } @@ -3908,18 +3917,18 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa UNTARGET_REGION #endif // SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H -/* end file src/generic/json_structural_indexer.h */ +/* end file */ #endif #if SIMDJSON_IMPLEMENTATION_WESTMERE -/* begin file src/westmere/stage1_find_marks.h */ +/* begin file westmere/stage1_find_marks.h */ #ifndef SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H #define SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H -/* begin file src/westmere/bitmask.h */ +/* begin file westmere/bitmask.h */ #ifndef SIMDJSON_WESTMERE_BITMASK_H #define SIMDJSON_WESTMERE_BITMASK_H -/* begin file src/westmere/intrinsics.h */ +/* begin file westmere/intrinsics.h */ #ifndef SIMDJSON_WESTMERE_INTRINSICS_H #define SIMDJSON_WESTMERE_INTRINSICS_H @@ -3930,7 +3939,7 @@ UNTARGET_REGION #endif // _MSC_VER #endif // SIMDJSON_WESTMERE_INTRINSICS_H -/* end file src/westmere/intrinsics.h */ +/* end file */ TARGET_WESTMERE namespace simdjson { @@ -3955,13 +3964,13 @@ really_inline uint64_t prefix_xor(const uint64_t bitmask) { UNTARGET_REGION #endif // SIMDJSON_WESTMERE_BITMASK_H -/* end file src/westmere/intrinsics.h */ -/* begin file src/westmere/simd.h */ +/* end file */ +/* begin file westmere/simd.h */ #ifndef SIMDJSON_WESTMERE_SIMD_H #define SIMDJSON_WESTMERE_SIMD_H /* simdprune_tables.h already included: #include "simdprune_tables.h" */ -/* begin file src/westmere/bitmanipulation.h */ +/* begin file westmere/bitmanipulation.h */ #ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H #define SIMDJSON_WESTMERE_BITMANIPULATION_H @@ -4048,7 +4057,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, UNTARGET_REGION #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H -/* end file src/westmere/bitmanipulation.h */ +/* end file */ /* westmere/intrinsics.h already included: #include "westmere/intrinsics.h" */ @@ -4405,7 +4414,7 @@ namespace simd { UNTARGET_REGION #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H -/* end file src/westmere/bitmanipulation.h */ +/* end file */ /* westmere/bitmanipulation.h already included: #include "westmere/bitmanipulation.h" */ /* westmere/implementation.h already included: #include "westmere/implementation.h" */ @@ -4461,7 +4470,7 @@ really_inline simd8 must_be_continuation(simd8 prev1, simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); } -/* begin file src/generic/buf_block_reader.h */ +/* begin file generic/buf_block_reader.h */ // Walks through a buffer in block-sized increments, loading the last part with spaces template struct buf_block_reader { @@ -4510,8 +4519,8 @@ UNUSED static char * format_mask(uint64_t mask) { buf[64] = '\0'; return buf; } -/* end file src/generic/buf_block_reader.h */ -/* begin file src/generic/json_string_scanner.h */ +/* end file */ +/* begin file generic/json_string_scanner.h */ namespace stage1 { struct json_string_block { @@ -4639,8 +4648,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file src/generic/json_string_scanner.h */ -/* begin file src/generic/json_scanner.h */ +/* end file */ +/* begin file generic/json_scanner.h */ namespace stage1 { /** @@ -4744,9 +4753,9 @@ really_inline error_code json_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file src/generic/json_scanner.h */ +/* end file */ -/* begin file src/generic/json_minifier.h */ +/* begin file generic/json_minifier.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -4820,12 +4829,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } } // namespace stage1 -/* end file src/generic/json_minifier.h */ +/* end file */ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { return westmere::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); } -/* begin file src/generic/utf8_lookup2_algorithm.h */ +/* begin file generic/utf8_lookup2_algorithm.h */ // // Detect Unicode errors. // @@ -5251,8 +5260,8 @@ namespace utf8_validation { } using utf8_validation::utf8_checker; -/* end file src/generic/utf8_lookup2_algorithm.h */ -/* begin file src/generic/json_structural_indexer.h */ +/* end file */ +/* begin file generic/json_structural_indexer.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -5428,7 +5437,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser } } // namespace stage1 -/* end file src/generic/json_structural_indexer.h */ +/* end file */ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { return westmere::stage1::json_structural_indexer::index<64>(buf, len, parser, streaming); } @@ -5439,13 +5448,13 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa UNTARGET_REGION #endif // SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H -/* end file src/generic/json_structural_indexer.h */ +/* end file */ #endif -/* end file src/generic/json_structural_indexer.h */ -/* begin file src/stage2_build_tape.cpp */ +/* end file */ +/* begin file stage2_build_tape.cpp */ #include #include -/* begin file src/jsoncharutils.h */ +/* begin file jsoncharutils.h */ #ifndef SIMDJSON_JSONCHARUTILS_H #define SIMDJSON_JSONCHARUTILS_H @@ -6764,8 +6773,8 @@ const uint64_t mantissa_128[] = {0x419ea3bd35385e2d, } // namespace simdjson #endif -/* end file src/jsoncharutils.h */ -/* begin file src/document_parser_callbacks.h */ +/* end file */ +/* begin file document_parser_callbacks.h */ #ifndef SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H #define SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H @@ -6910,7 +6919,7 @@ really_inline void parser::end_scope(uint32_t depth) noexcept { } // namespace dom #endif // SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H -/* end file src/document_parser_callbacks.h */ +/* end file */ using namespace simdjson; @@ -6921,12 +6930,12 @@ void found_bad_string(const uint8_t *buf); #endif #if SIMDJSON_IMPLEMENTATION_ARM64 -/* begin file src/arm64/stage2_build_tape.h */ +/* begin file arm64/stage2_build_tape.h */ #ifndef SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H #define SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H /* arm64/implementation.h already included: #include "arm64/implementation.h" */ -/* begin file src/arm64/stringparsing.h */ +/* begin file arm64/stringparsing.h */ #ifndef SIMDJSON_ARM64_STRINGPARSING_H #define SIMDJSON_ARM64_STRINGPARSING_H @@ -6973,7 +6982,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 }; } -/* begin file src/generic/stringparsing.h */ +/* begin file generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -7095,14 +7104,14 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file src/generic/stringparsing.h */ +/* end file */ } // namespace arm64 } // namespace simdjson #endif // SIMDJSON_ARM64_STRINGPARSING_H -/* end file src/generic/stringparsing.h */ -/* begin file src/arm64/numberparsing.h */ +/* end file */ +/* begin file arm64/numberparsing.h */ #ifndef SIMDJSON_ARM64_NUMBERPARSING_H #define SIMDJSON_ARM64_NUMBERPARSING_H @@ -7135,7 +7144,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file src/generic/numberparsing.h */ +/* begin file generic/numberparsing.h */ namespace numberparsing { @@ -7704,18 +7713,18 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file src/generic/numberparsing.h */ +/* end file */ } // namespace arm64 } // namespace simdjson #endif // SIMDJSON_ARM64_NUMBERPARSING_H -/* end file src/generic/numberparsing.h */ +/* end file */ namespace simdjson { namespace arm64 { -/* begin file src/generic/atomparsing.h */ +/* begin file generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -7765,8 +7774,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file src/generic/atomparsing.h */ -/* begin file src/generic/stage2_build_tape.h */ +/* end file */ +/* begin file generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -8216,8 +8225,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file src/generic/stage2_build_tape.h */ -/* begin file src/generic/stage2_streaming_build_tape.h */ +/* end file */ +/* begin file generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -8372,22 +8381,22 @@ finish: error: return parser.error(); } -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ } // namespace arm64 } // namespace simdjson #endif // SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ #endif #if SIMDJSON_IMPLEMENTATION_FALLBACK -/* begin file src/fallback/stage2_build_tape.h */ +/* begin file fallback/stage2_build_tape.h */ #ifndef SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H #define SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H /* fallback/implementation.h already included: #include "fallback/implementation.h" */ -/* begin file src/fallback/stringparsing.h */ +/* begin file fallback/stringparsing.h */ #ifndef SIMDJSON_FALLBACK_STRINGPARSING_H #define SIMDJSON_FALLBACK_STRINGPARSING_H @@ -8416,7 +8425,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 return { src[0] }; } -/* begin file src/generic/stringparsing.h */ +/* begin file generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -8538,19 +8547,19 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file src/generic/stringparsing.h */ +/* end file */ } // namespace fallback } // namespace simdjson #endif // SIMDJSON_FALLBACK_STRINGPARSING_H -/* end file src/generic/stringparsing.h */ -/* begin file src/fallback/numberparsing.h */ +/* end file */ +/* begin file fallback/numberparsing.h */ #ifndef SIMDJSON_FALLBACK_NUMBERPARSING_H #define SIMDJSON_FALLBACK_NUMBERPARSING_H /* jsoncharutils.h already included: #include "jsoncharutils.h" */ -/* begin file src/fallback/bitmanipulation.h */ +/* begin file fallback/bitmanipulation.h */ #ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H #define SIMDJSON_FALLBACK_BITMANIPULATION_H @@ -8610,7 +8619,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *resu } // namespace simdjson #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H -/* end file src/fallback/bitmanipulation.h */ +/* end file */ #include #include @@ -8633,7 +8642,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file src/generic/numberparsing.h */ +/* begin file generic/numberparsing.h */ namespace numberparsing { @@ -9202,19 +9211,19 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file src/generic/numberparsing.h */ +/* end file */ } // namespace fallback } // namespace simdjson #endif // SIMDJSON_FALLBACK_NUMBERPARSING_H -/* end file src/generic/numberparsing.h */ +/* end file */ namespace simdjson { namespace fallback { -/* begin file src/generic/atomparsing.h */ +/* begin file generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -9264,8 +9273,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file src/generic/atomparsing.h */ -/* begin file src/generic/stage2_build_tape.h */ +/* end file */ +/* begin file generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -9715,8 +9724,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file src/generic/stage2_build_tape.h */ -/* begin file src/generic/stage2_streaming_build_tape.h */ +/* end file */ +/* begin file generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -9871,21 +9880,21 @@ finish: error: return parser.error(); } -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ } // namespace fallback } // namespace simdjson #endif // SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ #endif #if SIMDJSON_IMPLEMENTATION_HASWELL -/* begin file src/haswell/stage2_build_tape.h */ +/* begin file haswell/stage2_build_tape.h */ #ifndef SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H #define SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H /* haswell/implementation.h already included: #include "haswell/implementation.h" */ -/* begin file src/haswell/stringparsing.h */ +/* begin file haswell/stringparsing.h */ #ifndef SIMDJSON_HASWELL_STRINGPARSING_H #define SIMDJSON_HASWELL_STRINGPARSING_H @@ -9928,7 +9937,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 }; } -/* begin file src/generic/stringparsing.h */ +/* begin file generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -10050,15 +10059,15 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file src/generic/stringparsing.h */ +/* end file */ } // namespace haswell } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_HASWELL_STRINGPARSING_H -/* end file src/generic/stringparsing.h */ -/* begin file src/haswell/numberparsing.h */ +/* end file */ +/* begin file haswell/numberparsing.h */ #ifndef SIMDJSON_HASWELL_NUMBERPARSING_H #define SIMDJSON_HASWELL_NUMBERPARSING_H @@ -10099,7 +10108,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file src/generic/numberparsing.h */ +/* begin file generic/numberparsing.h */ namespace numberparsing { @@ -10668,7 +10677,7 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file src/generic/numberparsing.h */ +/* end file */ } // namespace haswell @@ -10676,13 +10685,13 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, UNTARGET_REGION #endif // SIMDJSON_HASWELL_NUMBERPARSING_H -/* end file src/generic/numberparsing.h */ +/* end file */ TARGET_HASWELL namespace simdjson { namespace haswell { -/* begin file src/generic/atomparsing.h */ +/* begin file generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -10732,8 +10741,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file src/generic/atomparsing.h */ -/* begin file src/generic/stage2_build_tape.h */ +/* end file */ +/* begin file generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -11183,8 +11192,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file src/generic/stage2_build_tape.h */ -/* begin file src/generic/stage2_streaming_build_tape.h */ +/* end file */ +/* begin file generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -11339,22 +11348,22 @@ finish: error: return parser.error(); } -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ } // namespace haswell } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ #endif #if SIMDJSON_IMPLEMENTATION_WESTMERE -/* begin file src/westmere/stage2_build_tape.h */ +/* begin file westmere/stage2_build_tape.h */ #ifndef SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H #define SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H /* westmere/implementation.h already included: #include "westmere/implementation.h" */ -/* begin file src/westmere/stringparsing.h */ +/* begin file westmere/stringparsing.h */ #ifndef SIMDJSON_WESTMERE_STRINGPARSING_H #define SIMDJSON_WESTMERE_STRINGPARSING_H @@ -11399,7 +11408,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 }; } -/* begin file src/generic/stringparsing.h */ +/* begin file generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -11521,15 +11530,15 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file src/generic/stringparsing.h */ +/* end file */ } // namespace westmere } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_WESTMERE_STRINGPARSING_H -/* end file src/generic/stringparsing.h */ -/* begin file src/westmere/numberparsing.h */ +/* end file */ +/* begin file westmere/numberparsing.h */ #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H #define SIMDJSON_WESTMERE_NUMBERPARSING_H @@ -11571,7 +11580,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file src/generic/numberparsing.h */ +/* begin file generic/numberparsing.h */ namespace numberparsing { @@ -12140,7 +12149,7 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file src/generic/numberparsing.h */ +/* end file */ } // namespace westmere @@ -12148,13 +12157,13 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, UNTARGET_REGION #endif // SIMDJSON_WESTMERE_NUMBERPARSING_H -/* end file src/generic/numberparsing.h */ +/* end file */ TARGET_WESTMERE namespace simdjson { namespace westmere { -/* begin file src/generic/atomparsing.h */ +/* begin file generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -12204,8 +12213,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file src/generic/atomparsing.h */ -/* begin file src/generic/stage2_build_tape.h */ +/* end file */ +/* begin file generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -12655,8 +12664,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file src/generic/stage2_build_tape.h */ -/* begin file src/generic/stage2_streaming_build_tape.h */ +/* end file */ +/* begin file generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -12811,13 +12820,13 @@ finish: error: return parser.error(); } -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ } // namespace westmere } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ #endif -/* end file src/generic/stage2_streaming_build_tape.h */ -/* end file src/generic/stage2_streaming_build_tape.h */ +/* end file */ +/* end file */ diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index e6d5b38cd..09414b452 100644 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,5 +1,5 @@ -/* auto-generated on Sun Apr 19 11:36:20 PDT 2020. Do not edit! */ -/* begin file include/simdjson.h */ +/* auto-generated on Mon Apr 20 11:05:12 PDT 2020. Do not edit! */ +/* begin file simdjson.h */ #ifndef SIMDJSON_H #define SIMDJSON_H @@ -9,7 +9,7 @@ * Check the [README.md](https://github.com/lemire/simdjson/blob/master/README.md#simdjson--parsing-gigabytes-of-json-per-second). */ -/* begin file include/simdjson/compiler_check.h */ +/* begin file simdjson/compiler_check.h */ #ifndef SIMDJSON_COMPILER_CHECK_H #define SIMDJSON_COMPILER_CHECK_H @@ -45,10 +45,10 @@ #endif #endif // SIMDJSON_COMPILER_CHECK_H -/* end file include/simdjson/compiler_check.h */ +/* end file */ // Public API -/* begin file include/simdjson/simdjson_version.h */ +/* begin file simdjson/simdjson_version.h */ // /include/simdjson/simdjson_version.h automatically generated by release.py, // do not change by hand #ifndef SIMDJSON_SIMDJSON_VERSION_H @@ -75,17 +75,17 @@ enum { } // namespace simdjson #endif // SIMDJSON_SIMDJSON_VERSION_H -/* end file include/simdjson/simdjson_version.h */ -/* begin file include/simdjson/error.h */ +/* end file */ +/* begin file simdjson/error.h */ #ifndef SIMDJSON_ERROR_H #define SIMDJSON_ERROR_H -/* begin file include/simdjson/common_defs.h */ +/* begin file simdjson/common_defs.h */ #ifndef SIMDJSON_COMMON_DEFS_H #define SIMDJSON_COMMON_DEFS_H #include -/* begin file include/simdjson/portability.h */ +/* begin file simdjson/portability.h */ #ifndef SIMDJSON_PORTABILITY_H #define SIMDJSON_PORTABILITY_H @@ -242,7 +242,7 @@ static inline void aligned_free_char(char *mem_block) { } } // namespace simdjson #endif // SIMDJSON_PORTABILITY_H -/* end file include/simdjson/portability.h */ +/* end file */ namespace simdjson { @@ -367,7 +367,7 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; #if (!SIMDJSON_CPLUSPLUS17) SIMDJSON_PUSH_DISABLE_ALL_WARNINGS -/* begin file include/simdjson/nonstd/string_view.hpp */ +/* begin file simdjson/nonstd/string_view.hpp */ // Copyright 2017-2019 by Martin Moene // // string-view lite, a C++17-like string_view for C++98 and later. @@ -1897,7 +1897,7 @@ nssv_RESTORE_WARNINGS() #endif // nssv_HAVE_STD_STRING_VIEW #endif // NONSTD_SV_LITE_H_INCLUDED -/* end file include/simdjson/nonstd/string_view.hpp */ +/* end file */ SIMDJSON_POP_DISABLE_WARNINGS namespace std { @@ -1906,7 +1906,7 @@ namespace std { #endif // if (SIMDJSON_CPLUSPLUS < 201703L) #endif // SIMDJSON_COMMON_DEFS_H -/* end file include/simdjson/nonstd/string_view.hpp */ +/* end file */ #include #include @@ -2136,8 +2136,8 @@ inline const std::string &error_message(int error) noexcept; } // namespace simdjson #endif // SIMDJSON_ERROR_H -/* end file include/simdjson/nonstd/string_view.hpp */ -/* begin file include/simdjson/padded_string.h */ +/* end file */ +/* begin file simdjson/padded_string.h */ #ifndef SIMDJSON_PADDED_STRING_H #define SIMDJSON_PADDED_STRING_H @@ -2277,8 +2277,8 @@ inline char *allocate_padded_buffer(size_t length) noexcept; } // namespace simdjson #endif // SIMDJSON_PADDED_STRING_H -/* end file include/simdjson/padded_string.h */ -/* begin file include/simdjson/implementation.h */ +/* end file */ +/* begin file simdjson/implementation.h */ #ifndef SIMDJSON_IMPLEMENTATION_H #define SIMDJSON_IMPLEMENTATION_H @@ -2286,7 +2286,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept; #include #include #include -/* begin file include/simdjson/document.h */ +/* begin file simdjson/document.h */ #ifndef SIMDJSON_DOCUMENT_H #define SIMDJSON_DOCUMENT_H @@ -2295,7 +2295,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept; #include #include #include -/* begin file include/simdjson/simdjson.h */ +/* begin file simdjson/simdjson.h */ /** * @file * @deprecated We'll be removing this file so it isn't confused with the top level simdjson.h @@ -2305,7 +2305,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept; #endif // SIMDJSON_H -/* end file include/simdjson/simdjson.h */ +/* end file */ namespace simdjson { namespace dom { @@ -3634,7 +3634,7 @@ public: } // namespace simdjson #endif // SIMDJSON_DOCUMENT_H -/* end file include/simdjson/simdjson.h */ +/* end file */ namespace simdjson { @@ -3864,8 +3864,8 @@ extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr activ } // namespace simdjson #endif // SIMDJSON_IMPLEMENTATION_H -/* end file include/simdjson/simdjson.h */ -/* begin file include/simdjson/document_stream.h */ +/* end file */ +/* begin file simdjson/document_stream.h */ #ifndef SIMDJSON_DOCUMENT_STREAM_H #define SIMDJSON_DOCUMENT_STREAM_H @@ -4012,16 +4012,16 @@ private: } // namespace simdjson #endif // SIMDJSON_DOCUMENT_STREAM_H -/* end file include/simdjson/document_stream.h */ +/* end file */ // // Deprecated API -/* begin file include/simdjson/jsonparser.h */ +/* begin file simdjson/jsonparser.h */ // TODO Remove this -- deprecated API and files #ifndef SIMDJSON_JSONPARSER_H #define SIMDJSON_JSONPARSER_H -/* begin file include/simdjson/parsedjson.h */ +/* begin file simdjson/parsedjson.h */ // TODO Remove this -- deprecated API and files #ifndef SIMDJSON_PARSEDJSON_H @@ -4037,8 +4037,8 @@ using ParsedJson [[deprecated("Use dom::parser instead")]] = dom::parser; } // namespace simdjson #endif -/* end file include/simdjson/parsedjson.h */ -/* begin file include/simdjson/jsonioutil.h */ +/* end file */ +/* begin file simdjson/jsonioutil.h */ #ifndef SIMDJSON_JSONIOUTIL_H #define SIMDJSON_JSONIOUTIL_H @@ -4064,7 +4064,7 @@ inline padded_string get_corpus(const char *path) { } // namespace simdjson #endif // SIMDJSON_JSONIOUTIL_H -/* end file include/simdjson/jsonioutil.h */ +/* end file */ namespace simdjson { @@ -4174,8 +4174,8 @@ dom::parser build_parsed_json(const char *buf) noexcept = delete; } // namespace simdjson #endif -/* end file include/simdjson/jsonioutil.h */ -/* begin file include/simdjson/parsedjson_iterator.h */ +/* end file */ +/* begin file simdjson/parsedjson_iterator.h */ // TODO Remove this -- deprecated API and files #ifndef SIMDJSON_PARSEDJSON_ITERATOR_H @@ -4188,7 +4188,7 @@ dom::parser build_parsed_json(const char *buf) noexcept = delete; #include #include -/* begin file include/simdjson/internal/jsonformatutils.h */ +/* begin file simdjson/internal/jsonformatutils.h */ #ifndef SIMDJSON_INTERNAL_JSONFORMATUTILS_H #define SIMDJSON_INTERNAL_JSONFORMATUTILS_H @@ -4254,7 +4254,7 @@ inline std::ostream& operator<<(std::ostream& out, const escape_json_string &une } // namespace simdjson #endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H -/* end file include/simdjson/internal/jsonformatutils.h */ +/* end file */ namespace simdjson { @@ -4507,10 +4507,10 @@ public: } // namespace simdjson #endif -/* end file include/simdjson/internal/jsonformatutils.h */ +/* end file */ // // Inline functions -/* begin file include/simdjson/inline/document.h */ +/* begin file simdjson/inline/document.h */ #ifndef SIMDJSON_INLINE_DOCUMENT_H #define SIMDJSON_INLINE_DOCUMENT_H @@ -5679,8 +5679,8 @@ inline std::string_view internal::tape_ref::get_string_view() const noexcept { } // namespace simdjson #endif // SIMDJSON_INLINE_DOCUMENT_H -/* end file include/simdjson/inline/document.h */ -/* begin file include/simdjson/inline/document_stream.h */ +/* end file */ +/* begin file simdjson/inline/document_stream.h */ #ifndef SIMDJSON_INLINE_DOCUMENT_STREAM_H #define SIMDJSON_INLINE_DOCUMENT_STREAM_H @@ -5961,8 +5961,8 @@ inline error_code document_stream::json_parse() noexcept { } // namespace dom } // namespace simdjson #endif // SIMDJSON_INLINE_DOCUMENT_STREAM_H -/* end file include/simdjson/inline/document_stream.h */ -/* begin file include/simdjson/inline/error.h */ +/* end file */ +/* begin file simdjson/inline/error.h */ #ifndef SIMDJSON_INLINE_ERROR_H #define SIMDJSON_INLINE_ERROR_H @@ -6101,8 +6101,8 @@ really_inline simdjson_result::simdjson_result() noexcept } // namespace simdjson #endif // SIMDJSON_INLINE_ERROR_H -/* end file include/simdjson/inline/error.h */ -/* begin file include/simdjson/inline/padded_string.h */ +/* end file */ +/* begin file simdjson/inline/padded_string.h */ #ifndef SIMDJSON_INLINE_PADDED_STRING_H #define SIMDJSON_INLINE_PADDED_STRING_H @@ -6242,8 +6242,8 @@ inline simdjson_result padded_string::load(const std::string &fil } // namespace simdjson #endif // SIMDJSON_INLINE_PADDED_STRING_H -/* end file include/simdjson/inline/padded_string.h */ -/* begin file include/simdjson/inline/parsedjson_iterator.h */ +/* end file */ +/* begin file simdjson/inline/parsedjson_iterator.h */ #ifndef SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H #define SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H @@ -6717,7 +6717,7 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer, } // namespace simdjson #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H -/* end file include/simdjson/inline/parsedjson_iterator.h */ +/* end file */ #endif // SIMDJSON_H -/* end file include/simdjson/inline/parsedjson_iterator.h */ +/* end file */ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 88c095e3b..05c708cc8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,6 +4,7 @@ # target_link_libraries(my-program simdjson-include-source) gives you the header and source # directories. It does not specify any compiler flags. # + add_library(simdjson-include-source INTERFACE) target_link_libraries(simdjson-include-source INTERFACE simdjson-headers) target_include_directories(simdjson-include-source INTERFACE $) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 911c25804..0e8a28f4e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -139,7 +139,6 @@ if(NOT (MSVC AND MSVC_VERSION LESS 1920)) # Compile tests that *should fail* add_cpp_test(readme_examples_will_fail_with_exceptions_off WILL_FAIL COMPILE_ONLY LABELS acceptance SOURCES readme_examples.cpp) target_compile_definitions(readme_examples_will_fail_with_exceptions_off PRIVATE SIMDJSON_EXCEPTIONS=0) - endif() diff --git a/tools/release.py b/tools/release.py index 1434a0e2d..35100fad6 100755 --- a/tools/release.py +++ b/tools/release.py @@ -159,5 +159,5 @@ print("modified "+doxyfile+", a backup was made") scriptlocation = os.path.dirname(os.path.abspath(__file__)) -print("Please run the tests before issuing a release, do make test && make amalgamate \n") +print("Please run the tests before issuing a release, do make test && make amalgamate_test \n") print("to issue release, enter \n git commit -a && git push && git tag -a v"+toversionstring(*newversion)+" -m \"version "+toversionstring(*newversion)+"\" && git push --tags \n")