kopia lustrzana https://github.com/AlexandreRouma/SDRPlusPlus
Renamed discord-integration to discord_integration
rodzic
956969f679
commit
89dfeeb247
|
@ -89,7 +89,7 @@ add_subdirectory("weather_sat_decoder")
|
|||
endif (OPT_BUILD_WEATHER_SAT_DECODER)
|
||||
|
||||
if (OPT_BUILD_DISCORD_PRESENCE)
|
||||
add_subdirectory("discord-integration")
|
||||
add_subdirectory("discord_integration")
|
||||
endif (OPT_BUILD_DISCORD_PRESENCE)
|
||||
|
||||
if (MSVC)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(discord-integration)
|
||||
project(discord_integration)
|
||||
|
||||
if (MSVC)
|
||||
set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc")
|
||||
|
@ -14,9 +14,9 @@ add_subdirectory("discord-rpc")
|
|||
file(GLOB SRC "src/*.cpp")
|
||||
include_directories("src/" "discord-rpc/include")
|
||||
|
||||
add_library(discord-integration SHARED ${SRC})
|
||||
target_link_libraries(discord-integration PUBLIC sdrpp_core discord-rpc)
|
||||
set_target_properties(discord-integration PROPERTIES PREFIX "")
|
||||
add_library(discord_integration SHARED ${SRC})
|
||||
target_link_libraries(discord_integration PUBLIC sdrpp_core discord-rpc)
|
||||
set_target_properties(discord_integration PROPERTIES PREFIX "")
|
||||
|
||||
# Install directives
|
||||
install(TARGETS discord-integration DESTINATION lib/sdrpp/plugins)
|
||||
install(TARGETS discord_integration DESTINATION lib/sdrpp/plugins)
|
|
@ -122,26 +122,4 @@ endif(${BUILD_SHARED_LIBS})
|
|||
|
||||
if (CLANG_FORMAT_CMD)
|
||||
add_dependencies(discord-rpc clangformat)
|
||||
endif(CLANG_FORMAT_CMD)
|
||||
|
||||
# install
|
||||
|
||||
install(
|
||||
TARGETS discord-rpc
|
||||
EXPORT "discord-rpc"
|
||||
RUNTIME
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
LIBRARY
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
INCLUDES
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"../include/discord_rpc.h"
|
||||
"../include/discord_register.h"
|
||||
DESTINATION "include"
|
||||
)
|
||||
endif(CLANG_FORMAT_CMD)
|
|
@ -0,0 +1,22 @@
|
|||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.txt text
|
||||
*.md text
|
||||
*.cmake text
|
||||
*.svg text
|
||||
*.dot text
|
||||
*.yml text
|
||||
*.in text
|
||||
*.sh text
|
||||
*.autopkg text
|
||||
Dockerfile text
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.json binary
|
|
@ -0,0 +1,25 @@
|
|||
/bin/*
|
||||
!/bin/data
|
||||
!/bin/encodings
|
||||
!/bin/jsonchecker
|
||||
!/bin/types
|
||||
/build
|
||||
/doc/html
|
||||
/doc/doxygen_*.db
|
||||
*.a
|
||||
|
||||
# Temporary files created during CMake build
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
cmake_install.cmake
|
||||
CTestTestfile.cmake
|
||||
Makefile
|
||||
RapidJSON*.cmake
|
||||
RapidJSON.pc
|
||||
Testing
|
||||
/googletest
|
||||
install_manifest.txt
|
||||
Doxyfile
|
||||
Doxyfile.zh-cn
|
||||
DartConfiguration.tcl
|
||||
*.nupkg
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "thirdparty/gtest"]
|
||||
path = thirdparty/gtest
|
||||
url = https://github.com/google/googletest.git
|
|
@ -0,0 +1,98 @@
|
|||
sudo: required
|
||||
dist: precise
|
||||
|
||||
language: cpp
|
||||
cache:
|
||||
- ccache
|
||||
|
||||
env:
|
||||
global:
|
||||
- USE_CCACHE=1
|
||||
- CCACHE_SLOPPINESS=pch_defines,time_macros
|
||||
- CCACHE_COMPRESS=1
|
||||
- CCACHE_MAXSIZE=100M
|
||||
- ARCH_FLAGS_x86='-m32' # #266: don't use SSE on 32-bit
|
||||
- ARCH_FLAGS_x86_64='-msse4.2' # use SSE4.2 on 64-bit
|
||||
- GITHUB_REPO='miloyip/rapidjson'
|
||||
- secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
|
||||
|
||||
before_install:
|
||||
- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -y cmake valgrind g++-multilib libc6-dbg:i386
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# gcc
|
||||
- env: CONF=release ARCH=x86 CXX11=ON
|
||||
compiler: gcc
|
||||
- env: CONF=release ARCH=x86_64 CXX11=ON
|
||||
compiler: gcc
|
||||
- env: CONF=debug ARCH=x86 CXX11=OFF
|
||||
compiler: gcc
|
||||
- env: CONF=debug ARCH=x86_64 CXX11=OFF
|
||||
compiler: gcc
|
||||
# clang
|
||||
- env: CONF=debug ARCH=x86 CXX11=ON CCACHE_CPP2=yes
|
||||
compiler: clang
|
||||
- env: CONF=debug ARCH=x86_64 CXX11=ON CCACHE_CPP2=yes
|
||||
compiler: clang
|
||||
- env: CONF=debug ARCH=x86 CXX11=OFF CCACHE_CPP2=yes
|
||||
compiler: clang
|
||||
- env: CONF=debug ARCH=x86_64 CXX11=OFF CCACHE_CPP2=yes
|
||||
compiler: clang
|
||||
- env: CONF=release ARCH=x86 CXX11=ON CCACHE_CPP2=yes
|
||||
compiler: clang
|
||||
- env: CONF=release ARCH=x86_64 CXX11=ON CCACHE_CPP2=yes
|
||||
compiler: clang
|
||||
# coverage report
|
||||
- env: CONF=debug ARCH=x86 CXX11=ON GCOV_FLAGS='--coverage'
|
||||
compiler: gcc
|
||||
cache:
|
||||
- ccache
|
||||
- pip
|
||||
after_success:
|
||||
- pip install --user cpp-coveralls
|
||||
- coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h
|
||||
- env: CONF=debug ARCH=x86_64 GCOV_FLAGS='--coverage'
|
||||
compiler: gcc
|
||||
cache:
|
||||
- ccache
|
||||
- pip
|
||||
after_success:
|
||||
- pip install --user cpp-coveralls
|
||||
- coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h
|
||||
- script: # Documentation task
|
||||
- cd build
|
||||
- cmake .. -DRAPIDJSON_HAS_STDSTRING=ON -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
- make travis_doc
|
||||
cache: false
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- doxygen
|
||||
|
||||
before_script:
|
||||
- ccache -s
|
||||
# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469),
|
||||
# exposed by merging PR#163 (using -march=native)
|
||||
# TODO: Since this bug is already fixed. Remove this when valgrind can be upgraded.
|
||||
- sed -i "s/-march=native//" CMakeLists.txt
|
||||
- mkdir build
|
||||
|
||||
script:
|
||||
- if [ "$CXX" = "clang++" ]; then export CXXFLAGS="-stdlib=libc++ ${CXXFLAGS}"; fi
|
||||
- >
|
||||
eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ;
|
||||
(cd build && cmake
|
||||
-DRAPIDJSON_HAS_STDSTRING=ON
|
||||
-DRAPIDJSON_BUILD_CXX11=$CXX11
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=$CONF
|
||||
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS $GCOV_FLAGS"
|
||||
-DCMAKE_EXE_LINKER_FLAGS=$GCOV_FLAGS
|
||||
..)
|
||||
- cd build
|
||||
- make tests -j 2
|
||||
- make examples -j 2
|
||||
- ctest -j 2 -V `[ "$CONF" = "release" ] || echo "-E perftest"`
|
|
@ -0,0 +1,158 @@
|
|||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## 1.1.0 - 2016-08-25
|
||||
|
||||
### Added
|
||||
* Add GenericDocument ctor overload to specify JSON type (#369)
|
||||
* Add FAQ (#372, #373, #374, #376)
|
||||
* Add forward declaration header `fwd.h`
|
||||
* Add @PlatformIO Library Registry manifest file (#400)
|
||||
* Implement assignment operator for BigInteger (#404)
|
||||
* Add comments support (#443)
|
||||
* Adding coapp definition (#460)
|
||||
* documenttest.cpp: EXPECT_THROW when checking empty allocator (470)
|
||||
* GenericDocument: add implicit conversion to ParseResult (#480)
|
||||
* Use <wchar.h> with C++ linkage on Windows ARM (#485)
|
||||
* Detect little endian for Microsoft ARM targets
|
||||
* Check Nan/Inf when writing a double (#510)
|
||||
* Add JSON Schema Implementation (#522)
|
||||
* Add iostream wrapper (#530)
|
||||
* Add Jsonx example for converting JSON into JSONx (a XML format) (#531)
|
||||
* Add optional unresolvedTokenIndex parameter to Pointer::Get() (#532)
|
||||
* Add encoding validation option for Writer/PrettyWriter (#534)
|
||||
* Add Writer::SetMaxDecimalPlaces() (#536)
|
||||
* Support {0, } and {0, m} in Regex (#539)
|
||||
* Add Value::Get/SetFloat(), Value::IsLossLessFloat/Double() (#540)
|
||||
* Add stream position check to reader unit tests (#541)
|
||||
* Add Templated accessors and range-based for (#542)
|
||||
* Add (Pretty)Writer::RawValue() (#543)
|
||||
* Add Document::Parse(std::string), Document::Parse(const char*, size_t length) and related APIs. (#553)
|
||||
* Add move constructor for GenericSchemaDocument (#554)
|
||||
* Add VS2010 and VS2015 to AppVeyor CI (#555)
|
||||
* Add parse-by-parts example (#556, #562)
|
||||
* Support parse number as string (#564, #589)
|
||||
* Add kFormatSingleLineArray for PrettyWriter (#577)
|
||||
* Added optional support for trailing commas (#584)
|
||||
* Added filterkey and filterkeydom examples (#615)
|
||||
* Added npm docs (#639)
|
||||
* Allow options for writing and parsing NaN/Infinity (#641)
|
||||
* Add std::string overload to PrettyWriter::Key() when RAPIDJSON_HAS_STDSTRING is defined (#698)
|
||||
|
||||
### Fixed
|
||||
* Fix gcc/clang/vc warnings (#350, #394, #397, #444, #447, #473, #515, #582, #589, #595, #667)
|
||||
* Fix documentation (#482, #511, #550, #557, #614, #635, #660)
|
||||
* Fix emscripten alignment issue (#535)
|
||||
* Fix missing allocator to uses of AddMember in document (#365)
|
||||
* CMake will no longer complain that the minimum CMake version is not specified (#501)
|
||||
* Make it usable with old VC8 (VS2005) (#383)
|
||||
* Prohibit C++11 move from Document to Value (#391)
|
||||
* Try to fix incorrect 64-bit alignment (#419)
|
||||
* Check return of fwrite to avoid warn_unused_result build failures (#421)
|
||||
* Fix UB in GenericDocument::ParseStream (#426)
|
||||
* Keep Document value unchanged on parse error (#439)
|
||||
* Add missing return statement (#450)
|
||||
* Fix Document::Parse(const Ch*) for transcoding (#478)
|
||||
* encodings.h: fix typo in preprocessor condition (#495)
|
||||
* Custom Microsoft headers are necessary only for Visual Studio 2012 and lower (#559)
|
||||
* Fix memory leak for invalid regex (26e69ffde95ba4773ab06db6457b78f308716f4b)
|
||||
* Fix a bug in schema minimum/maximum keywords for 64-bit integer (e7149d665941068ccf8c565e77495521331cf390)
|
||||
* Fix a crash bug in regex (#605)
|
||||
* Fix schema "required" keyword cannot handle duplicated keys (#609)
|
||||
* Fix cmake CMP0054 warning (#612)
|
||||
* Added missing include guards in istreamwrapper.h and ostreamwrapper.h (#634)
|
||||
* Fix undefined behaviour (#646)
|
||||
* Fix buffer overrun using PutN (#673)
|
||||
* Fix rapidjson::value::Get<std::string>() may returns wrong data (#681)
|
||||
* Add Flush() for all value types (#689)
|
||||
* Handle malloc() fail in PoolAllocator (#691)
|
||||
* Fix builds on x32 platform. #703
|
||||
|
||||
### Changed
|
||||
* Clarify problematic JSON license (#392)
|
||||
* Move Travis to container based infrastructure (#504, #558)
|
||||
* Make whitespace array more compact (#513)
|
||||
* Optimize Writer::WriteString() with SIMD (#544)
|
||||
* x86-64 48-bit pointer optimization for GenericValue (#546)
|
||||
* Define RAPIDJSON_HAS_CXX11_RVALUE_REFS directly in clang (#617)
|
||||
* Make GenericSchemaDocument constructor explicit (#674)
|
||||
* Optimize FindMember when use std::string (#690)
|
||||
|
||||
## [1.0.2] - 2015-05-14
|
||||
|
||||
### Added
|
||||
* Add Value::XXXMember(...) overloads for std::string (#335)
|
||||
|
||||
### Fixed
|
||||
* Include rapidjson.h for all internal/error headers.
|
||||
* Parsing some numbers incorrectly in full-precision mode (`kFullPrecisionParseFlag`) (#342)
|
||||
* Fix some numbers parsed incorrectly (#336)
|
||||
* Fix alignment of 64bit platforms (#328)
|
||||
* Fix MemoryPoolAllocator::Clear() to clear user-buffer (0691502573f1afd3341073dd24b12c3db20fbde4)
|
||||
|
||||
### Changed
|
||||
* CMakeLists for include as a thirdparty in projects (#334, #337)
|
||||
* Change Document::ParseStream() to use stack allocator for Reader (ffbe38614732af8e0b3abdc8b50071f386a4a685)
|
||||
|
||||
## [1.0.1] - 2015-04-25
|
||||
|
||||
### Added
|
||||
* Changelog following [Keep a CHANGELOG](https://github.com/olivierlacan/keep-a-changelog) suggestions.
|
||||
|
||||
### Fixed
|
||||
* Parsing of some numbers (e.g. "1e-00011111111111") causing assertion (#314).
|
||||
* Visual C++ 32-bit compilation error in `diyfp.h` (#317).
|
||||
|
||||
## [1.0.0] - 2015-04-22
|
||||
|
||||
### Added
|
||||
* 100% [Coverall](https://coveralls.io/r/miloyip/rapidjson?branch=master) coverage.
|
||||
* Version macros (#311)
|
||||
|
||||
### Fixed
|
||||
* A bug in trimming long number sequence (4824f12efbf01af72b8cb6fc96fae7b097b73015).
|
||||
* Double quote in unicode escape (#288).
|
||||
* Negative zero roundtrip (double only) (#289).
|
||||
* Standardize behavior of `memcpy()` and `malloc()` (0c5c1538dcfc7f160e5a4aa208ddf092c787be5a, #305, 0e8bbe5e3ef375e7f052f556878be0bd79e9062d).
|
||||
|
||||
### Removed
|
||||
* Remove an invalid `Document::ParseInsitu()` API (e7f1c6dd08b522cfcf9aed58a333bd9a0c0ccbeb).
|
||||
|
||||
## 1.0-beta - 2015-04-8
|
||||
|
||||
### Added
|
||||
* RFC 7159 (#101)
|
||||
* Optional Iterative Parser (#76)
|
||||
* Deep-copy values (#20)
|
||||
* Error code and message (#27)
|
||||
* ASCII Encoding (#70)
|
||||
* `kParseStopWhenDoneFlag` (#83)
|
||||
* `kParseFullPrecisionFlag` (881c91d696f06b7f302af6d04ec14dd08db66ceb)
|
||||
* Add `Key()` to handler concept (#134)
|
||||
* C++11 compatibility and support (#128)
|
||||
* Optimized number-to-string and vice versa conversions (#137, #80)
|
||||
* Short-String Optimization (#131)
|
||||
* Local stream optimization by traits (#32)
|
||||
* Travis & Appveyor Continuous Integration, with Valgrind verification (#24, #242)
|
||||
* Redo all documentation (English, Simplified Chinese)
|
||||
|
||||
### Changed
|
||||
* Copyright ownership transfered to THL A29 Limited (a Tencent company).
|
||||
* Migrating from Premake to CMAKE (#192)
|
||||
* Resolve all warning reports
|
||||
|
||||
### Removed
|
||||
* Remove other JSON libraries for performance comparison (#180)
|
||||
|
||||
## 0.11 - 2012-11-16
|
||||
|
||||
## 0.1 - 2011-11-18
|
||||
|
||||
[Unreleased]: https://github.com/miloyip/rapidjson/compare/v1.1.0...HEAD
|
||||
[1.1.0]: https://github.com/miloyip/rapidjson/compare/v1.0.2...v1.1.0
|
||||
[1.0.2]: https://github.com/miloyip/rapidjson/compare/v1.0.1...v1.0.2
|
||||
[1.0.1]: https://github.com/miloyip/rapidjson/compare/v1.0.0...v1.0.1
|
||||
[1.0.0]: https://github.com/miloyip/rapidjson/compare/v1.0-beta...v1.0.0
|
|
@ -0,0 +1,173 @@
|
|||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
if(POLICY CMP0025)
|
||||
# detect Apple's Clang
|
||||
cmake_policy(SET CMP0025 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
|
||||
|
||||
PROJECT(RapidJSON CXX)
|
||||
|
||||
set(LIB_MAJOR_VERSION "1")
|
||||
set(LIB_MINOR_VERSION "1")
|
||||
set(LIB_PATCH_VERSION "0")
|
||||
set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
|
||||
|
||||
# compile in release with debug info mode by default
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif()
|
||||
|
||||
# Build all binaries in a separate directory
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." ON)
|
||||
option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." ON)
|
||||
option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." ON)
|
||||
option(RAPIDJSON_BUILD_THIRDPARTY_GTEST
|
||||
"Use gtest installation in `thirdparty/gtest` by default if available" OFF)
|
||||
|
||||
option(RAPIDJSON_BUILD_CXX11 "Build rapidjson with C++11 (gcc/clang)" ON)
|
||||
|
||||
option(RAPIDJSON_BUILD_ASAN "Build rapidjson with address sanitizer (gcc/clang)" OFF)
|
||||
option(RAPIDJSON_BUILD_UBSAN "Build rapidjson with undefined behavior sanitizer (gcc/clang)" OFF)
|
||||
|
||||
option(RAPIDJSON_HAS_STDSTRING "" OFF)
|
||||
if(RAPIDJSON_HAS_STDSTRING)
|
||||
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
|
||||
endif()
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
endif()
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror")
|
||||
if (RAPIDJSON_BUILD_CXX11)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
endif()
|
||||
if (RAPIDJSON_BUILD_ASAN)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.0")
|
||||
message(FATAL_ERROR "GCC < 4.8 doesn't support the address sanitizer")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
endif()
|
||||
if (RAPIDJSON_BUILD_UBSAN)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
|
||||
message(FATAL_ERROR "GCC < 4.9 doesn't support the undefined behavior sanitizer")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
endif()
|
||||
endif()
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers")
|
||||
if (RAPIDJSON_BUILD_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
if (RAPIDJSON_BUILD_ASAN)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
if (RAPIDJSON_BUILD_UBSAN)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
endif()
|
||||
endif()
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
||||
endif()
|
||||
|
||||
#add extra search paths for libraries and includes
|
||||
SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
|
||||
SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install")
|
||||
SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation")
|
||||
|
||||
IF(UNIX OR CYGWIN)
|
||||
SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}")
|
||||
ELSEIF(WIN32)
|
||||
SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
|
||||
ENDIF()
|
||||
SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake fiels are installed in")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
if(RAPIDJSON_BUILD_DOC)
|
||||
add_subdirectory(doc)
|
||||
endif()
|
||||
|
||||
add_custom_target(travis_doc)
|
||||
add_custom_command(TARGET travis_doc
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/travis-doxygen.sh)
|
||||
|
||||
if(RAPIDJSON_BUILD_EXAMPLES)
|
||||
add_subdirectory(example)
|
||||
endif()
|
||||
|
||||
if(RAPIDJSON_BUILD_TESTS)
|
||||
if(MSVC11)
|
||||
# required for VS2012 due to missing support for variadic templates
|
||||
add_definitions(-D_VARIADIC_MAX=10)
|
||||
endif(MSVC11)
|
||||
add_subdirectory(test)
|
||||
include(CTest)
|
||||
endif()
|
||||
|
||||
# pkg-config
|
||||
IF (UNIX OR CYGWIN)
|
||||
CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
|
||||
@ONLY)
|
||||
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
|
||||
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
|
||||
COMPONENT pkgconfig)
|
||||
ENDIF()
|
||||
|
||||
install(FILES readme.md
|
||||
DESTINATION "${DOC_INSTALL_DIR}"
|
||||
COMPONENT doc)
|
||||
|
||||
install(DIRECTORY include/rapidjson
|
||||
DESTINATION "${INCLUDE_INSTALL_DIR}"
|
||||
COMPONENT dev)
|
||||
|
||||
install(DIRECTORY example/
|
||||
DESTINATION "${DOC_INSTALL_DIR}/examples"
|
||||
COMPONENT examples
|
||||
# Following patterns are for excluding the intermediate/object files
|
||||
# from an install of in-source CMake build.
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
PATTERN "Makefile" EXCLUDE
|
||||
PATTERN "cmake_install.cmake" EXCLUDE)
|
||||
|
||||
# Provide config and version files to be used by other applications
|
||||
# ===============================
|
||||
|
||||
export(PACKAGE ${PROJECT_NAME})
|
||||
|
||||
# cmake-modules
|
||||
CONFIGURE_FILE(${PROJECT_NAME}Config.cmake.in
|
||||
${PROJECT_NAME}Config.cmake
|
||||
@ONLY)
|
||||
CONFIGURE_FILE(${PROJECT_NAME}ConfigVersion.cmake.in
|
||||
${PROJECT_NAME}ConfigVersion.cmake
|
||||
@ONLY)
|
||||
INSTALL(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION "${CMAKE_INSTALL_DIR}"
|
||||
COMPONENT dev)
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
SET(GTEST_SEARCH_PATH
|
||||
"${GTEST_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../thirdparty/gtest/googletest")
|
||||
|
||||
IF(UNIX)
|
||||
IF(RAPIDJSON_BUILD_THIRDPARTY_GTEST)
|
||||
LIST(APPEND GTEST_SEARCH_PATH "/usr/src/gtest")
|
||||
ELSE()
|
||||
LIST(INSERT GTEST_SEARCH_PATH 1 "/usr/src/gtest")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(GTEST_SOURCE_DIR
|
||||
NAMES CMakeLists.txt src/gtest_main.cc
|
||||
PATHS ${GTEST_SEARCH_PATH})
|
||||
|
||||
|
||||
# Debian installs gtest include directory in /usr/include, thus need to look
|
||||
# for include directory separately from source directory.
|
||||
FIND_PATH(GTEST_INCLUDE_DIR
|
||||
NAMES gtest/gtest.h
|
||||
PATH_SUFFIXES include
|
||||
HINTS ${GTEST_SOURCE_DIR}
|
||||
PATHS ${GTEST_SEARCH_PATH})
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GTestSrc DEFAULT_MSG
|
||||
GTEST_SOURCE_DIR
|
||||
GTEST_INCLUDE_DIR)
|
|
@ -0,0 +1,7 @@
|
|||
includedir=@INCLUDE_INSTALL_DIR@
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: A fast JSON parser/generator for C++ with both SAX/DOM style API
|
||||
Version: @LIB_VERSION_STRING@
|
||||
URL: https://github.com/miloyip/rapidjson
|
||||
Cflags: -I${includedir}
|
|
@ -0,0 +1,3 @@
|
|||
get_filename_component(RAPIDJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
set(RAPIDJSON_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@")
|
||||
message(STATUS "RapidJSON found. Headers: ${RAPIDJSON_INCLUDE_DIRS}")
|
|
@ -0,0 +1,10 @@
|
|||
SET(PACKAGE_VERSION "@LIB_VERSION_STRING@")
|
||||
|
||||
IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
|
||||
SET(PACKAGE_VERSION_EXACT "true")
|
||||
ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
|
||||
IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
|
||||
SET(PACKAGE_VERSION_COMPATIBLE "true")
|
||||
ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
|
||||
SET(PACKAGE_VERSION_UNSUITABLE "true")
|
||||
ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
|
|
@ -0,0 +1,41 @@
|
|||
os: Visual Studio 2015 CTP
|
||||
version: 1.1.0.{build}
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
# - VS_VERSION: 9 2008
|
||||
# VS_PLATFORM: win32
|
||||
# - VS_VERSION: 9 2008
|
||||
# VS_PLATFORM: x64
|
||||
- VS_VERSION: 10 2010
|
||||
VS_PLATFORM: win32
|
||||
- VS_VERSION: 10 2010
|
||||
VS_PLATFORM: x64
|
||||
- VS_VERSION: 11 2012
|
||||
VS_PLATFORM: win32
|
||||
- VS_VERSION: 11 2012
|
||||
VS_PLATFORM: x64
|
||||
- VS_VERSION: 12 2013
|
||||
VS_PLATFORM: win32
|
||||
- VS_VERSION: 12 2013
|
||||
VS_PLATFORM: x64
|
||||
- VS_VERSION: 14 2015
|
||||
VS_PLATFORM: win32
|
||||
- VS_VERSION: 14 2015
|
||||
VS_PLATFORM: x64
|
||||
|
||||
before_build:
|
||||
- git submodule update --init --recursive
|
||||
- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%VS_PLATFORM% -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=true -Wno-dev
|
||||
|
||||
build:
|
||||
project: Build\VS\RapidJSON.sln
|
||||
parallel: true
|
||||
verbosity: minimal
|
||||
|
||||
test_script:
|
||||
- cd Build\VS && if %CONFIGURATION%==Debug (ctest --verbose -E perftest --build-config %CONFIGURATION%) else (ctest --verbose --build-config %CONFIGURATION%)
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"glossary": {
|
||||
"title": "example glossary",
|
||||
"GlossDiv": {
|
||||
"title": "S",
|
||||
"GlossList": {
|
||||
"GlossEntry": {
|
||||
"ID": "SGML",
|
||||
"SortAs": "SGML",
|
||||
"GlossTerm": "Standard Generalized Markup Language",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"para": "A meta-markup language, used to create markup languages such as DocBook.",
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
},
|
||||
"GlossSee": "markup"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{"menu": {
|
||||
"header": "SVG Viewer",
|
||||
"items": [
|
||||
{"id": "Open"},
|
||||
{"id": "OpenNew", "label": "Open New"},
|
||||
null,
|
||||
{"id": "ZoomIn", "label": "Zoom In"},
|
||||
{"id": "ZoomOut", "label": "Zoom Out"},
|
||||
{"id": "OriginalView", "label": "Original View"},
|
||||
null,
|
||||
{"id": "Quality"},
|
||||
{"id": "Pause"},
|
||||
{"id": "Mute"},
|
||||
null,
|
||||
{"id": "Find", "label": "Find..."},
|
||||
{"id": "FindAgain", "label": "Find Again"},
|
||||
{"id": "Copy"},
|
||||
{"id": "CopyAgain", "label": "Copy Again"},
|
||||
{"id": "CopySVG", "label": "Copy SVG"},
|
||||
{"id": "ViewSVG", "label": "View SVG"},
|
||||
{"id": "ViewSource", "label": "View Source"},
|
||||
{"id": "SaveAs", "label": "Save As"},
|
||||
null,
|
||||
{"id": "Help"},
|
||||
{"id": "About", "label": "About Adobe CVG Viewer..."}
|
||||
]
|
||||
}}
|
|
@ -0,0 +1 @@
|
|||
sample.json is obtained from http://code.google.com/p/json-test-suite/downloads/detail?name=sample.zip
|
3315
discord_integration/discord-rpc/thirdparty/rapidjson-1.1.0/bin/data/sample.json
vendored
100644
3315
discord_integration/discord-rpc/thirdparty/rapidjson-1.1.0/bin/data/sample.json
vendored
100644
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,88 @@
|
|||
{"web-app": {
|
||||
"servlet": [
|
||||
{
|
||||
"servlet-name": "cofaxCDS",
|
||||
"servlet-class": "org.cofax.cds.CDSServlet",
|
||||
"init-param": {
|
||||
"configGlossary:installationAt": "Philadelphia, PA",
|
||||
"configGlossary:adminEmail": "ksm@pobox.com",
|
||||
"configGlossary:poweredBy": "Cofax",
|
||||
"configGlossary:poweredByIcon": "/images/cofax.gif",
|
||||
"configGlossary:staticPath": "/content/static",
|
||||
"templateProcessorClass": "org.cofax.WysiwygTemplate",
|
||||
"templateLoaderClass": "org.cofax.FilesTemplateLoader",
|
||||
"templatePath": "templates",
|
||||
"templateOverridePath": "",
|
||||
"defaultListTemplate": "listTemplate.htm",
|
||||
"defaultFileTemplate": "articleTemplate.htm",
|
||||
"useJSP": false,
|
||||
"jspListTemplate": "listTemplate.jsp",
|
||||
"jspFileTemplate": "articleTemplate.jsp",
|
||||
"cachePackageTagsTrack": 200,
|
||||
"cachePackageTagsStore": 200,
|
||||
"cachePackageTagsRefresh": 60,
|
||||
"cacheTemplatesTrack": 100,
|
||||
"cacheTemplatesStore": 50,
|
||||
"cacheTemplatesRefresh": 15,
|
||||
"cachePagesTrack": 200,
|
||||
"cachePagesStore": 100,
|
||||
"cachePagesRefresh": 10,
|
||||
"cachePagesDirtyRead": 10,
|
||||
"searchEngineListTemplate": "forSearchEnginesList.htm",
|
||||
"searchEngineFileTemplate": "forSearchEngines.htm",
|
||||
"searchEngineRobotsDb": "WEB-INF/robots.db",
|
||||
"useDataStore": true,
|
||||
"dataStoreClass": "org.cofax.SqlDataStore",
|
||||
"redirectionClass": "org.cofax.SqlRedirection",
|
||||
"dataStoreName": "cofax",
|
||||
"dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver",
|
||||
"dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon",
|
||||
"dataStoreUser": "sa",
|
||||
"dataStorePassword": "dataStoreTestQuery",
|
||||
"dataStoreTestQuery": "SET NOCOUNT ON;select test='test';",
|
||||
"dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log",
|
||||
"dataStoreInitConns": 10,
|
||||
"dataStoreMaxConns": 100,
|
||||
"dataStoreConnUsageLimit": 100,
|
||||
"dataStoreLogLevel": "debug",
|
||||
"maxUrlLength": 500}},
|
||||
{
|
||||
"servlet-name": "cofaxEmail",
|
||||
"servlet-class": "org.cofax.cds.EmailServlet",
|
||||
"init-param": {
|
||||
"mailHost": "mail1",
|
||||
"mailHostOverride": "mail2"}},
|
||||
{
|
||||
"servlet-name": "cofaxAdmin",
|
||||
"servlet-class": "org.cofax.cds.AdminServlet"},
|
||||
|
||||
{
|
||||
"servlet-name": "fileServlet",
|
||||
"servlet-class": "org.cofax.cds.FileServlet"},
|
||||
{
|
||||
"servlet-name": "cofaxTools",
|
||||
"servlet-class": "org.cofax.cms.CofaxToolsServlet",
|
||||
"init-param": {
|
||||
"templatePath": "toolstemplates/",
|
||||
"log": 1,
|
||||
"logLocation": "/usr/local/tomcat/logs/CofaxTools.log",
|
||||
"logMaxSize": "",
|
||||
"dataLog": 1,
|
||||
"dataLogLocation": "/usr/local/tomcat/logs/dataLog.log",
|
||||
"dataLogMaxSize": "",
|
||||
"removePageCache": "/content/admin/remove?cache=pages&id=",
|
||||
"removeTemplateCache": "/content/admin/remove?cache=templates&id=",
|
||||
"fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder",
|
||||
"lookInContext": 1,
|
||||
"adminGroupID": 4,
|
||||
"betaServer": true}}],
|
||||
"servlet-mapping": {
|
||||
"cofaxCDS": "/",
|
||||
"cofaxEmail": "/cofaxutil/aemail/*",
|
||||
"cofaxAdmin": "/admin/*",
|
||||
"fileServlet": "/static/*",
|
||||
"cofaxTools": "/tools/*"},
|
||||
|
||||
"taglib": {
|
||||
"taglib-uri": "cofax.tld",
|
||||
"taglib-location": "/WEB-INF/tlds/cofax.tld"}}}
|
|
@ -0,0 +1,26 @@
|
|||
{"widget": {
|
||||
"debug": "on",
|
||||
"window": {
|
||||
"title": "Sample Konfabulator Widget",
|
||||
"name": "main_window",
|
||||
"width": 500,
|
||||
"height": 500
|
||||
},
|
||||
"image": {
|
||||
"src": "Images/Sun.png",
|
||||
"name": "sun1",
|
||||
"hOffset": 250,
|
||||
"vOffset": 250,
|
||||
"alignment": "center"
|
||||
},
|
||||
"text": {
|
||||
"data": "Click Here",
|
||||
"size": 36,
|
||||
"style": "bold",
|
||||
"name": "text1",
|
||||
"hOffset": 250,
|
||||
"vOffset": 100,
|
||||
"alignment": "center",
|
||||
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
|
||||
}
|
||||
}}
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"en":"I can eat glass and it doesn't hurt me.",
|
||||
"zh-Hant":"我能吞下玻璃而不傷身體。",
|
||||
"zh-Hans":"我能吞下玻璃而不伤身体。",
|
||||
"ja":"私はガラスを食べられます。それは私を傷つけません。",
|
||||
"ko":"나는 유리를 먹을 수 있어요. 그래도 아프지 않아요"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"en":"I can eat glass and it doesn't hurt me.",
|
||||
"zh-Hant":"我能吞下玻璃而不傷身體。",
|
||||
"zh-Hans":"我能吞下玻璃而不伤身体。",
|
||||
"ja":"私はガラスを食べられます。それは私を傷つけません。",
|
||||
"ko":"나는 유리를 먹을 수 있어요. 그래도 아프지 않아요"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
"A JSON payload should be an object or array, not a string."
|
|
@ -0,0 +1 @@
|
|||
{"Extra value after close": true} "misplaced quoted value"
|
|
@ -0,0 +1 @@
|
|||
{"Illegal expression": 1 + 2}
|
|
@ -0,0 +1 @@
|
|||
{"Illegal invocation": alert()}
|
|
@ -0,0 +1 @@
|
|||
{"Numbers cannot have leading zeroes": 013}
|
|
@ -0,0 +1 @@
|
|||
{"Numbers cannot be hex": 0x14}
|
|
@ -0,0 +1 @@
|
|||
["Illegal backslash escape: \x15"]
|
|
@ -0,0 +1 @@
|
|||
[\naked]
|
|
@ -0,0 +1 @@
|
|||
["Illegal backslash escape: \017"]
|
|
@ -0,0 +1 @@
|
|||
[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]
|
|
@ -0,0 +1 @@
|
|||
{"Missing colon" null}
|
|
@ -0,0 +1 @@
|
|||
["Unclosed array"
|
|
@ -0,0 +1 @@
|
|||
{"Double colon":: null}
|
|
@ -0,0 +1 @@
|
|||
{"Comma instead of colon", null}
|
|
@ -0,0 +1 @@
|
|||
["Colon instead of comma": false]
|
Some files were not shown because too many files have changed in this diff Show More
Ładowanie…
Reference in New Issue