Skip to content

Commit

Permalink
Squashed 'rapidjson/' changes from 9515b9c..4f20bdc
Browse files Browse the repository at this point in the history
4f20bdc Merge pull request #515 from miloyip/cxx11warnings
4031150 Add travis C++11 on/off matrix
a749040 Try to fix a clang missing assignment warning
d8c793f Disable type_traits
2f5a69b Try using c++0x for gcc 4.6.x
a6eb15d Fix warnings in clang for C++11
534da22 Merge branch 'master' into cxx11warnings
968a666 Merge pull request #513 from miloyip/optimization
f183282 Fix warning
a202d82 Make whitespace array more compact
4f4aff3 Fix clang compilation
a5990f3 Optimize ScanCopyUnescapedString for insitu parsing
f13caad Fix valgrind problem
e392652 Fix compilation
d1e6eae Remove unused code
6863f7b Fix warning
ae5cf58 Fix ScanCopyUnescapedString performance issue
1502e7e Merge branch 'master' into optimization
69d0f41 Implemented ScanCopyUnescapeString optimization
66f99d2 Merge pull request #511 from ReadmeCritic/master
292a5c9 Update README URLs based on HTTP redirects
8fbe442 Merge pull request #510 from miloyip/issue509_writingnaninf
78c7d54 Fix #498 VC2015 warnings
bab80e7 Fix clang warning
ad1d22e Fix #509 by checking Nan/Inf when writing a double
44f81f0 Remove travis doc job number checking.
bd1be76 Fix #508 tutorial documentation about move semantics.
df76c0d Apply LIKELY/UNLIKELY in Reader
122c722 More LIKELY/UNLIKELY in Writer
bcc3fb6 Fix stack reserve bug
ef6957c PutReserve() and PutUnsafe() optimisation for Writer
1a21379 Merge branch 'master' into optimization
f7a64c5 Add RAPIDJSON_LIKELY/UNLIKELY and apply them in stack
adb7d17 Fix warnings for misctest

git-subtree-dir: rapidjson
git-subtree-split: 4f20bdcf39ecb607699661be414ec11ea9cfc3e7
  • Loading branch information
xpol committed Jan 26, 2016
1 parent c30e7fa commit 1f37cec
Show file tree
Hide file tree
Showing 32 changed files with 1,996 additions and 300 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!/bin/data
!/bin/encodings
!/bin/jsonchecker
!/bin/types
/build
/doc/html
/doc/doxygen_*.db
Expand Down
137 changes: 38 additions & 99 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,115 +1,54 @@
language: cpp
sudo: false
cache:
- ccache

addons:
apt:
packages: &default_packages
- cmake
- valgrind
compiler:
- clang
- gcc

env:
matrix:
- CONF=debug ARCH=x86_64 CXX11=ON
- CONF=release ARCH=x86_64 CXX11=ON
- CONF=debug ARCH=x86 CXX11=ON
- CONF=release ARCH=x86 CXX11=ON
- CONF=debug ARCH=x86_64 CXX11=OFF
- CONF=debug ARCH=x86 CXX11=OFF
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="

matrix:
include:
- env: CONF=release ARCH=x86
compiler: gcc
addons:
apt:
packages:
- *default_packages
- g++-multilib
- libc6-dbg:i386
- env: CONF=release ARCH=x86_64
compiler: gcc
- env: CONF=debug ARCH=x86 CCACHE_CPP2=yes
compiler: clang
addons:
apt:
packages:
- *default_packages
- g++-multilib
- libc6-dbg:i386
- env: CONF=debug ARCH=x86_64 CCACHE_CPP2=yes
compiler: clang
- env: CONF=release ARCH=x86 CCACHE_CPP2=yes
compiler: clang
addons:
apt:
packages:
- *default_packages
- g++-multilib
- libc6-dbg:i386
- env: CONF=release ARCH=x86_64 CCACHE_CPP2=yes
compiler: clang
# coverage report
- env: CONF=debug ARCH=x86 GCOV_FLAGS='--coverage'
compiler: gcc
cache:
- ccache
- pip
addons:
apt:
packages:
- *default_packages
- g++-multilib
- libc6-dbg:i386
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
addons:
apt:
packages:
- *default_packages
- g++-multilib
- libc6-dbg:i386
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_install:
- sudo apt-get update -qq
- sudo apt-get install -qq cmake valgrind
- sudo apt-get --no-install-recommends install doxygen # Don't install LaTeX stuffs
- if [ "$ARCH" = "x86" ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi
- if [ "$CC" = "gcc" ] && [ "$CONF" = "debug" ]; then sudo pip install cpp-coveralls; export GCOV_FLAGS='--coverage'; fi

install: true

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.
# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469),
# exposed by merging PR#163 (using -march=native)
- sed -i "s/-march=native//" CMakeLists.txt
- mkdir build
- mkdir build
- >
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
..)
script:
- >
eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ;
(cd build && cmake
-DRAPIDJSON_HAS_STDSTRING=ON
-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"`
- make tests
- make examples
- ctest -V `[ "$CONF" = "release" ] || echo "-E perftest"`
- make travis_doc

after_success:
- 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
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,27 @@ 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_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()
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()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
endif()
Expand Down
102 changes: 102 additions & 0 deletions bin/types/booleans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[
true,
true,
false,
false,
true,
true,
true,
false,
false,
true,
false,
false,
true,
false,
false,
false,
true,
false,
false,
true,
true,
false,
true,
true,
true,
false,
false,
false,
true,
false,
true,
false,
false,
true,
true,
true,
true,
true,
true,
false,
false,
true,
false,
false,
false,
true,
true,
false,
true,
true,
false,
true,
false,
true,
true,
true,
false,
false,
false,
true,
false,
false,
false,
true,
true,
false,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
true,
false,
false,
false,
true,
true,
true,
false,
false,
true,
false
]
Loading

0 comments on commit 1f37cec

Please sign in to comment.