Skip to content

Commit c28465e

Browse files
committed
Squashed 'thirdparty/protobuf/third_party/jsoncpp/' content from commit 9059f5cad
git-subtree-dir: thirdparty/protobuf/third_party/jsoncpp git-subtree-split: 9059f5cad030ba11d37818847443a53918c327b1
0 parents  commit c28465e

File tree

243 files changed

+25692
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+25692
-0
lines changed

.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BasedOnStyle: LLVM
2+
DerivePointerAlignment: false
3+
PointerAlignment: Left
4+

.clang-tidy

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
Checks: 'google-readability-casting,modernize-deprecated-headers,modernize-loop-convert,modernize-use-auto,modernize-use-default-member-init,modernize-use-using,readability-else-after-return,readability-redundant-member-init,readability-redundant-string-cstr'
3+
WarningsAsErrors: ''
4+
HeaderFilterRegex: ''
5+
AnalyzeTemporaryDtors: false
6+
FormatStyle: none
7+
CheckOptions:
8+
- key: modernize-use-using.IgnoreMacros
9+
value: '0'
10+
...
11+

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto
2+
*.h text
3+
*.cpp text
4+
*.json text
5+
*.in text
6+
*.sh eol=lf
7+
*.bat eol=crlf
8+
*.vcproj eol=crlf
9+
*.vcxproj eol=crlf
10+
*.sln eol=crlf
11+
devtools/agent_vm* eol=crlf

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1.
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Desktop (please complete the following information):**
21+
- OS: [e.g. iOS]
22+
- Meson version
23+
- Ninja version
24+
25+
**Additional context**
26+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/build/
2+
/build-*/
3+
*.pyc
4+
*.swp
5+
*.actual
6+
*.actual-rewrite
7+
*.process-output
8+
*.rewrite
9+
/bin/
10+
/libs/
11+
/doc/doxyfile
12+
/dist/
13+
14+
# MSVC project files:
15+
*.sln
16+
*.vcxproj
17+
*.filters
18+
*.user
19+
*.sdf
20+
*.opensdf
21+
*.suo
22+
23+
# MSVC build files:
24+
*.lib
25+
*.obj
26+
*.tlog/
27+
*.pdb
28+
29+
# CMake-generated files:
30+
CMakeFiles/
31+
/pkg-config/jsoncpp.pc
32+
jsoncpp_lib_static.dir/
33+
34+
# In case someone runs cmake in the root-dir:
35+
/CMakeCache.txt
36+
/Makefile
37+
/include/Makefile
38+
/src/Makefile
39+
/src/jsontestrunner/Makefile
40+
/src/jsontestrunner/jsontestrunner_exe
41+
/src/lib_json/Makefile
42+
/src/test_lib_json/Makefile
43+
/src/test_lib_json/jsoncpp_test
44+
*.a
45+
46+
# eclipse project files
47+
.project
48+
.cproject
49+
/.settings/
50+
51+
# DS_Store
52+
.DS_Store

.travis.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Build matrix / environment variables are explained on:
2+
# http://about.travis-ci.org/docs/user/build-configuration/
3+
# This file can be validated on: http://www.yamllint.com/
4+
# Or using the Ruby based travel command line tool:
5+
# gem install travis --no-rdoc --no-ri
6+
# travis lint .travis.yml
7+
language: cpp
8+
sudo: false
9+
addons:
10+
homebrew:
11+
packages:
12+
- clang-format
13+
- meson
14+
- ninja
15+
update: false # do not update homebrew by default
16+
apt:
17+
sources:
18+
- ubuntu-toolchain-r-test
19+
- llvm-toolchain-xenial-8
20+
packages:
21+
- clang-format-8
22+
- clang-8
23+
- valgrind
24+
matrix:
25+
allow_failures:
26+
- os: osx
27+
include:
28+
- name: Mac clang meson static release testing
29+
os: osx
30+
osx_image: xcode11
31+
compiler: clang
32+
env:
33+
CXX="clang++"
34+
CC="clang"
35+
LIB_TYPE=static
36+
BUILD_TYPE=release
37+
script: ./.travis_scripts/meson_builder.sh
38+
- name: Linux xenial clang meson static release testing
39+
os: linux
40+
dist: xenial
41+
compiler: clang
42+
env:
43+
CXX="clang++"
44+
CC="clang"
45+
LIB_TYPE=static
46+
BUILD_TYPE=release
47+
# before_install and install steps only needed for linux meson builds
48+
before_install:
49+
- source ./.travis_scripts/travis.before_install.${TRAVIS_OS_NAME}.sh
50+
install:
51+
- source ./.travis_scripts/travis.install.${TRAVIS_OS_NAME}.sh
52+
script: ./.travis_scripts/meson_builder.sh
53+
- name: Linux xenial gcc cmake coverage
54+
os: linux
55+
dist: xenial
56+
compiler: gcc
57+
env:
58+
CXX=g++
59+
CC=gcc
60+
DO_Coverage=ON
61+
BUILD_TOOL="Unix Makefiles"
62+
BUILD_TYPE=Debug
63+
LIB_TYPE=shared
64+
DESTDIR=/tmp/cmake_json_cpp
65+
before_install:
66+
- pip install --user cpp-coveralls
67+
script: ./.travis_scripts/cmake_builder.sh
68+
after_success:
69+
- coveralls --include src/lib_json --include include
70+
notifications:
71+
email: false

.travis_scripts/cmake_builder.sh

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
#!/usr/bin/env sh
2+
# This script can be used on the command line directly to configure several
3+
# different build environments.
4+
# This is called by `.travis.yml` via Travis CI.
5+
# Travis supplies $TRAVIS_OS_NAME.
6+
# http://docs.travis-ci.com/user/multi-os/
7+
# Our .travis.yml also defines:
8+
9+
# - BUILD_TYPE=Release/Debug
10+
# - LIB_TYPE=static/shared
11+
#
12+
# Optional environmental variables
13+
# - DESTDIR <- used for setting the install prefix
14+
# - BUILD_TOOL=["Unix Makefile"|"Ninja"]
15+
# - BUILDNAME <- how to identify this build on the dashboard
16+
# - DO_MemCheck <- if set, try to use valgrind
17+
# - DO_Coverage <- if set, try to do dashboard coverage testing
18+
#
19+
20+
env_set=1
21+
if ${BUILD_TYPE+false}; then
22+
echo "BUILD_TYPE not set in environment."
23+
env_set=0
24+
fi
25+
if ${LIB_TYPE+false}; then
26+
echo "LIB_TYPE not set in environment."
27+
env_set=0
28+
fi
29+
if ${CXX+false}; then
30+
echo "CXX not set in environment."
31+
env_set=0
32+
fi
33+
34+
35+
if [ ${env_set} -eq 0 ]; then
36+
echo "USAGE: CXX=$(which clang++) BUILD_TYPE=[Release|Debug] LIB_TYPE=[static|shared] $0"
37+
echo ""
38+
echo "Examples:"
39+
echo " CXX=$(which clang++) BUILD_TYPE=Release LIB_TYPE=shared DESTDIR=/tmp/cmake_json_cpp $0"
40+
echo " CXX=$(which clang++) BUILD_TYPE=Debug LIB_TYPE=shared DESTDIR=/tmp/cmake_json_cpp $0"
41+
echo " CXX=$(which clang++) BUILD_TYPE=Release LIB_TYPE=static DESTDIR=/tmp/cmake_json_cpp $0"
42+
echo " CXX=$(which clang++) BUILD_TYPE=Debug LIB_TYPE=static DESTDIR=/tmp/cmake_json_cpp $0"
43+
44+
echo " CXX=$(which g++) BUILD_TYPE=Release LIB_TYPE=shared DESTDIR=/tmp/cmake_json_cpp $0"
45+
echo " CXX=$(which g++) BUILD_TYPE=Debug LIB_TYPE=shared DESTDIR=/tmp/cmake_json_cpp $0"
46+
echo " CXX=$(which g++) BUILD_TYPE=Release LIB_TYPE=static DESTDIR=/tmp/cmake_json_cpp $0"
47+
echo " CXX=$(which g++) BUILD_TYPE=Debug LIB_TYPE=static DESTDIR=/tmp/cmake_json_cpp $0"
48+
49+
exit -1
50+
fi
51+
52+
if ${DESTDIR+false}; then
53+
DESTDIR="/usr/local"
54+
fi
55+
56+
# -e: fail on error
57+
# -v: show commands
58+
# -x: show expanded commands
59+
set -vex
60+
61+
env | sort
62+
63+
which cmake
64+
cmake --version
65+
66+
echo ${CXX}
67+
${CXX} --version
68+
_COMPILER_NAME=`basename ${CXX}`
69+
if [ "${LIB_TYPE}" = "shared" ]; then
70+
_CMAKE_BUILD_SHARED_LIBS=ON
71+
else
72+
_CMAKE_BUILD_SHARED_LIBS=OFF
73+
fi
74+
75+
CTEST_TESTING_OPTION="-D ExperimentalTest"
76+
# - DO_MemCheck <- if set, try to use valgrind
77+
if ! ${DO_MemCheck+false}; then
78+
valgrind --version
79+
CTEST_TESTING_OPTION="-D ExperimentalMemCheck"
80+
else
81+
# - DO_Coverage <- if set, try to do dashboard coverage testing
82+
if ! ${DO_Coverage+false}; then
83+
export CXXFLAGS="-fprofile-arcs -ftest-coverage"
84+
export LDFLAGS="-fprofile-arcs -ftest-coverage"
85+
CTEST_TESTING_OPTION="-D ExperimentalTest -D ExperimentalCoverage"
86+
#gcov --version
87+
fi
88+
fi
89+
90+
# Ninja = Generates build.ninja files.
91+
if ${BUILD_TOOL+false}; then
92+
BUILD_TOOL="Ninja"
93+
export _BUILD_EXE=ninja
94+
which ninja
95+
ninja --version
96+
else
97+
# Unix Makefiles = Generates standard UNIX makefiles.
98+
export _BUILD_EXE=make
99+
fi
100+
101+
_BUILD_DIR_NAME="build-cmake_${BUILD_TYPE}_${LIB_TYPE}_${_COMPILER_NAME}_${_BUILD_EXE}"
102+
mkdir -p ${_BUILD_DIR_NAME}
103+
cd "${_BUILD_DIR_NAME}"
104+
if ${BUILDNAME+false}; then
105+
_HOSTNAME=`hostname -s`
106+
BUILDNAME="${_HOSTNAME}_${BUILD_TYPE}_${LIB_TYPE}_${_COMPILER_NAME}_${_BUILD_EXE}"
107+
fi
108+
cmake \
109+
-G "${BUILD_TOOL}" \
110+
-DBUILDNAME:STRING="${BUILDNAME}" \
111+
-DCMAKE_CXX_COMPILER:PATH=${CXX} \
112+
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE} \
113+
-DBUILD_SHARED_LIBS:BOOL=${_CMAKE_BUILD_SHARED_LIBS} \
114+
-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR} \
115+
../
116+
117+
ctest -C ${BUILD_TYPE} -D ExperimentalStart -D ExperimentalConfigure -D ExperimentalBuild ${CTEST_TESTING_OPTION} -D ExperimentalSubmit
118+
# Final step is to verify that installation succeeds
119+
cmake --build . --config ${BUILD_TYPE} --target install
120+
121+
if [ "${DESTDIR}" != "/usr/local" ]; then
122+
${_BUILD_EXE} install
123+
fi
124+
cd -
125+
126+
if ${CLEANUP+false}; then
127+
echo "Skipping cleanup: build directory will persist."
128+
else
129+
rm -r "${_BUILD_DIR_NAME}"
130+
fi

0 commit comments

Comments
 (0)