Skip to content

Commit

Permalink
Squashed 'Source/RapidJSON/Source/' changes from 2661a17c7..8261c1ddf
Browse files Browse the repository at this point in the history
8261c1ddf Merge pull request #1969 from MalcolmTyrrell/MalcolmTyrrell/sanitizeSchemaCode
0d78b1ce9 Merge pull request #1989 from adamcalhoon/really-fix-placement-new-alignment
1dff2abff Fix the alignment of placement new buffer for GenericValue.
e4bde9774 Merge pull request #1988 from Tencent/revert-1987-fix-placement-new-alignment
88bbd87dd Revert "Fix the alignment of placement new buffer for GenericValue."
bf8ca5da8 Merge pull request #1987 from adamcalhoon/fix-placement-new-alignment
5b242b6b2 Fix the alignment of placement new buffer for GenericValue.
fd3dc29a5 Merge pull request #1944 from ilelann/patch-1
53602ec6b Sanitize the code in schema.h
0d4517f15 Merge pull request #1961 from jedwardsol/issue1960_arm64ec_intrinsic
060c348ea use softintrin on arm64ec
4d6cb0818 Merge pull request #1949 from ardb-uk/master
033bef3c6 Merge pull request #1 from ardb-uk/ardb-uk-patch-1
befba39af Merge pull request #2 from ardb-uk/ardb-uk-patch-1-1
4bbaf28ff Add files via upload
14f1e37f8 Resolve issue 1948
e6736d1ba Support CMake none targets
2e8f5d897 Merge pull request #1940 from smhdfdl/issue-1924
9ea3f45db fix the warning
b9ae2499e Merge pull request #1941 from DiamondI/patch-1
553a3ea31 typo on documentation dom.zh-cn.md: "己于" -> "已于"
864e44aef Merge branch 'master' of https://github.com/Tencent/rapidjson
00dbcf2c6 Merge pull request #1926 from Kyrega/master
22ee8b07c Correct WIStreamWrapper
a3d52c75b No default template parameter for older compilers
19b55c904 No default template parameter for older compilers
128b1031b Use rapidjson internal::SelectIf
8710d7e98 Do not depend on c++11 conditional
e0512e094 Using unsigned for WIStreamWrapper
7fac34f7b Added typename
b952a592a Fix RawNumber for longer char types
28c59ab4c Merge pull request #1922 from jack-perisich/grisu2_precision
bb0621108 Fix small errors in dtoa output for certain doubles
7ee918fc8 Merge branch 'master' of https://github.com/Tencent/rapidjson
48fbd8cd2 Merge pull request #1848 from smhdfdl/id-and-ref
8d16abd98 Uri Parse improvements
b557259f8 Merge pull request #1904 from Tencent/issue1899_pointerappend
a21cf9f7b equiv fix for issue 1899
8c29a7b49 Fix Pointer::Append() crash for custom allocator on Windows
12b88efa6 fix coverage again
f6ebcb200 fix Uri.Match optional arg
3df804c12 fix coverage, unit test allocators and equality
18ab3b16b remove temp debug statements
6d253c160 remove compiler warning
28bcbd3f3 make std::string optional
494447b73 remove copyright & debug statements
6e58a53f4 fix coverage
3987d82f4 Merge branch 'master' of https://github.com/Tencent/rapidjson into id-and-ref
9c1002f94 rge branch 'master' of https://github.com/Tencent/rapidjson
17aa824c9 Merge pull request #1885 from saurabhchardereal/master
cd737fb54 Improve documentation
25fa7a119 Merge pull request #1883 from nkolotov/fix/issues/1882
3aa8d04b7 Fixed -Wshadow warning.
e0f68a435 Merge pull request #1877 from hendrikmuhs/windows-GetObject-conflict-#1418
3cdfde14d replace auto with concrete type
d179facf9 don't let the GetObject macro rewrite the GetObject method, add a GetObj alias
3168d7c34 add a test that provokes a compile time error on windows
47b837e14 Merge pull request #1485 from ylavic/MemberMap
be4a5a908 Turn some Tests to RAPIDJSON_USE_MEMBERSMAP in CI.
fc08f4f61 Tests for Members in std::multimap.
71f0fa7eb Set RAPIDJSON_USE_MEMBERSMAP to use a (std::multi)map for object members.
7d801bbe4 Merge pull request #1503 from ylavic/sub_value_assignment
03676c9bf Merge pull request #1870 from ylavic/allocators_rvalues
aa0675ffd Try some tests with -D_GLIBCXX_DEBUG and coverage with -O0.
5c764d9a8 Tests for Allocators copy by rvalue reference.
683010b02 Add rvalue copy and assignment to MemoryPoolAllocator and StdAllocator.
117276c41 Fix would-crash tests if the default allocator used were kNeedFree.
49aa0fc15 Merge pull request #1868 from ylavic/cpp17_in_ci
a8bd93176 Tests for C++17 with VS 2019.
6bed9b266 Don't define StdAllocator<void> from C++17.
e336667b4 Handle C++17 (and C++11 with MSVC) in CI.
b996a2371 Merge pull request #1866 from ylavic/std_allocator_traits
08cf9a56c Make StdAllocator C++17-20 compatible.
02f42604b Make StdAllocator C++17-20 compatible.
cd5ee4dfe Merge pull request #1858 from ylavic/std_allocator
3d77d11e2 add traverse as pointer example
2e6f76145 Tests for StdAllocator.
49e4dd619 Provide StdAllocator, STL compatible, for use with STL types.
50cb424c3 Test assignment from inner Value.
c033292ae Safer GenericValue& operator=(GenericValue& rhs).
d51dd2d0e RAPIDJSON_NOEXCEPT_ASSERT should assert regardless of RAPIDJSON_HAS_CXX11_NOEXCEPT.
cdb2d4757 Provide RAPIDJSON_HAS_CXX11 and use it for RAPIDJSON_HAS_CXX11_RVALUE_REFS and RAPIDJSON_HAS_CXX11_NOEXCEPT.
bc026e3fb satisfy all compilers 3
24b9b7e27 satisfy all compilers 2
32722fa31 satisfy all compilers
8768b5b1d correct #defines in uri.h
6c9da69ab remove comma
6b57738e4 handle internal refs properly
1c2c8e085 doc: fix incorrect template parameters in EncodedOutputStream example
fe1a29ca6 fix platform-dependent compiler error with >>
ad73c032e fix compile errors
892f6e3fd fix bracket
cabc3d5aa merge
7698b3cd4 code and tests
dad85cab9 Merge pull request #2 from smhdfdl/multiple-validation-failures-and-validation-messages
b1a4d91a5 Merge pull request #1779 from pavel-pimenov/fix-1778-part-1
8be64594f Merge pull request #1847 from stac47/fix_1846
24ebd5128 Fix recursive operator== call in C++20 (#1846)
8bce684cd Merge pull request #1844 from smhdfdl/multiple-validation-failures-and-validation-messages
9bb81e20f fix crash where simple type with sub-schema has a bad value
13dfc96c9 Merge pull request #1837 from smhdfdl/multiple-validation-failures-and-validation-messages
167efb4fa work around issue 1089
28dc42d8d restore coverage
a3757456f correct workaround for issue 1805
7fee368be Revert "revert perftest"
221e8d536 revert perftest
f89e75af7 remove C++ 11 std::string to_string() syntax
c491dd521 remove C++ 11 enum syntax
6f3cccd6e remove debug std::cout, handle empty error object in example
05e7b3397 code and tests
5d17b24e5 Merge pull request #1 from Tencent/master
585042c02 Merge pull request #1821 from slsyy/master
cbf62de55 Add implicit conversion from Object and Array to Value (#1404)
3cdd3c837 Merge pull request #1817 from lukedan/lukedan_cpp20
5e50f27ed also initialize class member
1e4f59d3a add return statement & comment
d742a030a add body to private copy constructor & copy assignment
300692623 suppress enum bitwise operation warnings on msvc
13f5ab4f4 fix schema test compile error
56f215e5c Merge pull request #1568 from ericrannaud/ericrannaud/memberiterator-public
0ccdbf364 Merge pull request #1786 from ssb22/master
b7734d97c Remove unnecessary wording from BSD license not needed for MIT license (fixes #528)
3a65e2dd7 fix Tencent/rapidjson#1778 (part 1)
ce81bc9ed Merge pull request #1760 from escherstair/fix_ce6_support
5fbf8bf89 fix unit test
7f559ec80 fix naive implementation for clzll()
58e296485 add unit test for clzll()
aa5dd6086 fix naive version implementation
91940e84b fallback to the naive version for CE6
6364c8e5a fix _BitScanReverse() usage for CE6
f56928de8 Merge pull request #1744 from lklein53/improve-surrogate-handling
6694c996b Add test case for low surrogate handling
ed73d7bdb Improve surrogate handling
88bd956d6 Merge pull request #1453 from eidosmontreal/custom_malloc
004e8e61a Merge branch 'master' into custom_malloc
1a803826f Merge pull request #1720 from madeso/master
ac0fc79c7 Fixes issue #1718
8f4c021fa Merge pull request #1689 from g199209/master
1ce28f454 Add CMake minimum version required.
f37669082 Add a target to RapidJSONConfig.cmake.in (#1350)
234ff044f ci: upgrade distro to xenial and add arm64 test cases (#1662)
36481c30b Update Visual Studio Visualizer (#1665)
d4f03d0d0 Doc: Fix some typos. (#1675)
ebcbd0448 Three-way comparison for CLang 10 fix (#1679)
ebc003e20 Make GenericMemberIterator::Iterator public again (RAPIDJSON_NOMEMBERITERATORCLASS)
cef07fb1b Added parameters to RAPIDJSON_MALLOC, RAPIDJSON_REALLOC and RAPIDJSON_FREE
ad2e5369b Adding a single customization point that ensures all allocations within rapidjson can be performed with a custom memory allocator; Introduces the macros RAPIDJSON_MALLOC, RAPIDJSON_REALLOC, and RAPIDJSON_FREE.

git-subtree-dir: Source/RapidJSON/Source
git-subtree-split: 8261c1ddf43f10de00fd8c9a67811d1486b2c784
  • Loading branch information
mxmauro committed Apr 2, 2022
1 parent 98d74f9 commit 2d7b2d6
Show file tree
Hide file tree
Showing 94 changed files with 5,638 additions and 690 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!/bin/encodings
!/bin/jsonchecker
!/bin/types
!/bin/unittestschema
/build
/doc/html
/doc/doxygen_*.db
Expand Down
119 changes: 93 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
sudo: required
dist: trusty
group: edge
dist: xenial

language: cpp
cache:
- ccache

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- valgrind
- clang-8
env:
global:
- USE_CCACHE=1
Expand All @@ -14,49 +21,96 @@ env:
- 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
- ARCH_FLAGS_aarch64='-march=armv8-a'
- GITHUB_REPO='Tencent/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 --allow-unauthenticated

matrix:
include:
# gcc
- env: CONF=release ARCH=x86 CXX11=ON
- env: CONF=release ARCH=x86 CXX11=ON CXX17=OFF MEMBERSMAP=OFF
compiler: gcc
arch: amd64
- env: CONF=release ARCH=x86_64 CXX11=ON CXX17=OFF MEMBERSMAP=OFF
compiler: gcc
arch: amd64
- env: CONF=release ARCH=x86_64 CXX11=ON CXX17=OFF MEMBERSMAP=ON
compiler: gcc
arch: amd64
- env: CONF=debug ARCH=x86 CXX11=OFF CXX17=OFF MEMBERSMAP=OFF
compiler: gcc
arch: amd64
- env: CONF=debug ARCH=x86_64 CXX11=OFF CXX17=OFF MEMBERSMAP=OFF
compiler: gcc
- env: CONF=release ARCH=x86_64 CXX11=ON
arch: amd64
- env: CONF=debug ARCH=x86 CXX11=OFF CXX17=ON MEMBERSMAP=ON CXX_FLAGS='-D_GLIBCXX_DEBUG'
compiler: gcc
- env: CONF=debug ARCH=x86 CXX11=OFF
arch: amd64
- env: CONF=debug ARCH=x86_64 CXX11=OFF CXX17=ON MEMBERSMAP=ON CXX_FLAGS='-D_GLIBCXX_DEBUG'
compiler: gcc
- env: CONF=debug ARCH=x86_64 CXX11=OFF
arch: amd64
- env: CONF=release ARCH=aarch64 CXX11=ON CXX17=OFF MEMBERSMAP=OFF
compiler: gcc
arch: arm64
- env: CONF=release ARCH=aarch64 CXX11=OFF CXX17=OFF MEMBERSMAP=OFF
compiler: gcc
arch: arm64
- env: CONF=release ARCH=aarch64 CXX11=OFF CXX17=ON MEMBERSMAP=ON
compiler: gcc
arch: arm64
# clang
- env: CONF=debug ARCH=x86 CXX11=ON CCACHE_CPP2=yes
- env: CONF=release ARCH=x86 CXX11=ON CXX17=OFF MEMBERSMAP=ON CCACHE_CPP2=yes
compiler: clang
arch: amd64
- env: CONF=release ARCH=x86_64 CXX11=ON CXX17=OFF MEMBERSMAP=ON CCACHE_CPP2=yes
compiler: clang
arch: amd64
- env: CONF=release ARCH=x86_64 CXX11=ON CXX17=OFF MEMBERSMAP=OFF CCACHE_CPP2=yes
compiler: clang
arch: amd64
- env: CONF=debug ARCH=x86 CXX11=OFF CXX17=OFF MEMBERSMAP=ON CCACHE_CPP2=yes
compiler: clang
- env: CONF=debug ARCH=x86_64 CXX11=ON CCACHE_CPP2=yes
arch: amd64
- env: CONF=debug ARCH=x86_64 CXX11=OFF CXX17=OFF MEMBERSMAP=ON CCACHE_CPP2=yes
compiler: clang
- env: CONF=debug ARCH=x86 CXX11=OFF CCACHE_CPP2=yes
arch: amd64
- env: CONF=debug ARCH=x86 CXX11=OFF CXX17=ON MEMBERSMAP=OFF CCACHE_CPP2=yes
compiler: clang
- env: CONF=debug ARCH=x86_64 CXX11=OFF CCACHE_CPP2=yes
arch: amd64
- env: CONF=debug ARCH=x86_64 CXX11=OFF CXX17=ON MEMBERSMAP=OFF CCACHE_CPP2=yes
compiler: clang
- env: CONF=release ARCH=x86 CXX11=ON CCACHE_CPP2=yes
arch: amd64
- env: CONF=debug ARCH=aarch64 CXX11=ON CXX17=OFF MEMBERSMAP=ON CCACHE_CPP2=yes
compiler: clang
- env: CONF=release ARCH=x86_64 CXX11=ON CCACHE_CPP2=yes
arch: arm64
- env: CONF=debug ARCH=aarch64 CXX11=OFF CXX17=OFF MEMBERSMAP=ON CCACHE_CPP2=yes
compiler: clang
arch: arm64
- env: CONF=debug ARCH=aarch64 CXX11=OFF CXX17=ON MEMBERSMAP=OFF CCACHE_CPP2=yes
compiler: clang
arch: arm64
# coverage report
- env: CONF=debug ARCH=x86 CXX11=ON GCOV_FLAGS='--coverage'
- env: CONF=debug ARCH=x86 GCOV_FLAGS='--coverage' CXX_FLAGS='-O0' CXX11=OFF CXX17=OFF
compiler: gcc
arch: amd64
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' CXX_FLAGS='-O0' CXX11=ON CXX17=OFF MEMBERSMAP=ON
compiler: gcc
arch: amd64
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'
- env: CONF=debug ARCH=aarch64 GCOV_FLAGS='--coverage' CXX_FLAGS='-O0' CXX11=OFF CXX17=ON
compiler: gcc
arch: arm64
cache:
- ccache
- pip
Expand All @@ -73,24 +127,37 @@ matrix:
packages:
- doxygen

before_install:
- if [ "x86_64" = "$(arch)" ]; then sudo apt-get install -y g++-multilib libc6-dbg:i386 --allow-unauthenticated; fi

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
# travis provides clang-7 for amd64 and clang-3.8 for arm64
# here use clang-8 to all architectures as clang-7 is not available for arm64
- if [ -f /usr/bin/clang++-8 ]; then
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 1000;
sudo update-alternatives --config clang++;
export PATH=/usr/bin:$PATH;
fi
- if [ "$CXX" = "clang++" ]; then export CCACHE_CPP2=yes; fi
- 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_USE_MEMBERSMAP=$MEMBERSMAP
-DRAPIDJSON_BUILD_CXX11=$CXX11
-DRAPIDJSON_BUILD_CXX17=$CXX17
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$CONF
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS $GCOV_FLAGS"
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS $GCOV_FLAGS $CXX_FLAGS"
-DCMAKE_EXE_LINKER_FLAGS=$GCOV_FLAGS
..)
- cd build
Expand Down
36 changes: 30 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ 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_CXX11 "Build rapidjson with C++11" ON)
option(RAPIDJSON_BUILD_CXX17 "Build rapidjson with C++17" OFF)
if(RAPIDJSON_BUILD_CXX11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
Expand All @@ -51,6 +52,11 @@ if(RAPIDJSON_HAS_STDSTRING)
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
endif()

option(RAPIDJSON_USE_MEMBERSMAP "" OFF)
if(RAPIDJSON_USE_MEMBERSMAP)
add_definitions(-DRAPIDJSON_USE_MEMBERSMAP=1)
endif()

find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
Expand All @@ -77,6 +83,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
elseif (RAPIDJSON_BUILD_CXX17 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
if (RAPIDJSON_BUILD_ASAN)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.0")
Expand Down Expand Up @@ -105,6 +113,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wimplicit-fallthrough)
if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif (RAPIDJSON_BUILD_CXX17 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
if (RAPIDJSON_BUILD_ASAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
Expand All @@ -119,6 +129,18 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
# CMake >= 3.10 should handle the above CMAKE_CXX_STANDARD fine, otherwise use /std:c++XX with MSVC >= 19.10
if (RAPIDJSON_BUILD_CXX11 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.10")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11")
elseif (RAPIDJSON_BUILD_CXX17 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.14")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
endif()
# Always compile with /WX
if(CMAKE_CXX_FLAGS MATCHES "/WX-")
string(REGEX REPLACE "/WX-" "/WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qarch=auto")
endif()
Expand Down Expand Up @@ -219,8 +241,10 @@ INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAM
DESTINATION ${CMAKECONFIG_INSTALL_DIR} )

# Install files
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
DESTINATION "${CMAKE_INSTALL_DIR}"
COMPONENT dev)
IF(CMAKE_INSTALL_DIR)
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
DESTINATION "${CMAKE_INSTALL_DIR}"
COMPONENT dev)
ENDIF()
10 changes: 10 additions & 0 deletions RapidJSONConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
################################################################################
# CMake minimum version required
cmake_minimum_required(VERSION 3.0)

################################################################################
# RapidJSON source dir
set( RapidJSON_SOURCE_DIR "@CONFIG_SOURCE_DIR@")
Expand All @@ -13,3 +17,9 @@ get_filename_component(RapidJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set( RapidJSON_INCLUDE_DIR "@RapidJSON_INCLUDE_DIR@" )
set( RapidJSON_INCLUDE_DIRS "@RapidJSON_INCLUDE_DIR@" )
message(STATUS "RapidJSON found. Headers: ${RapidJSON_INCLUDE_DIRS}")

if(NOT TARGET rapidjson)
add_library(rapidjson INTERFACE IMPORTED)
set_property(TARGET rapidjson PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${RapidJSON_INCLUDE_DIRS})
endif()
50 changes: 49 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,85 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VS_VERSION: 10 2010
VS_PLATFORM: win32
CXX11: OFF
CXX17: OFF
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VS_VERSION: 10 2010
VS_PLATFORM: x64
CXX11: OFF
CXX17: OFF
MEMBERSMAP: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VS_VERSION: 11 2012
VS_PLATFORM: win32
CXX11: OFF
CXX17: OFF
MEMBERSMAP: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VS_VERSION: 11 2012
VS_PLATFORM: x64
CXX11: OFF
CXX17: OFF
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VS_VERSION: 12 2013
VS_PLATFORM: win32
CXX11: OFF
CXX17: OFF
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VS_VERSION: 12 2013
VS_PLATFORM: x64
CXX11: OFF
CXX17: OFF
MEMBERSMAP: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VS_VERSION: 14 2015
VS_PLATFORM: win32
CXX11: OFF
CXX17: OFF
MEMBERSMAP: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VS_VERSION: 14 2015
VS_PLATFORM: x64
CXX11: OFF
CXX17: OFF
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: 15 2017
VS_PLATFORM: win32
CXX11: OFF
CXX17: OFF
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: 15 2017
VS_PLATFORM: x64
CXX11: OFF
CXX17: OFF
MEMBERSMAP: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: 15 2017
VS_PLATFORM: x64
CXX11: ON
CXX17: OFF
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: 15 2017
VS_PLATFORM: x64
CXX11: OFF
CXX17: ON
MEMBERSMAP: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VS_VERSION: 16 2019
VS_PLATFORM: x64
CXX11: OFF
CXX17: ON
MEMBERSMAP: ON

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
- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%VS_PLATFORM% -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=true -DRAPIDJSON_BUILD_CXX11=%CXX11% -DRAPIDJSON_BUILD_CXX17=%CXX17% -DRAPIDJSON_USE_MEMBERSMAP=%MEMBERSMAP% -Wno-dev

build:
project: Build\VS\RapidJSON.sln
Expand Down
Loading

0 comments on commit 2d7b2d6

Please sign in to comment.