Skip to content

Commit d0ab674

Browse files
authored
Merge pull request #1 from open-source-parsers/master
update feom origin
2 parents d8cd848 + d61cdde commit d0ab674

Some content is hidden

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

59 files changed

+914
-1393
lines changed

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/build/
2+
/build-*/
23
*.pyc
34
*.swp
45
*.actual
56
*.actual-rewrite
67
*.process-output
78
*.rewrite
89
/bin/
9-
/buildscons/
1010
/libs/
1111
/doc/doxyfile
1212
/dist/
@@ -30,9 +30,8 @@
3030

3131
# CMake-generated files:
3232
CMakeFiles/
33-
CTestTestFile.cmake
34-
cmake_install.cmake
35-
pkg-config/jsoncpp.pc
33+
*.cmake
34+
/pkg-config/jsoncpp.pc
3635
jsoncpp_lib_static.dir/
3736

3837
# In case someone runs cmake in the root-dir:
@@ -45,8 +44,12 @@ jsoncpp_lib_static.dir/
4544
/src/lib_json/Makefile
4645
/src/test_lib_json/Makefile
4746
/src/test_lib_json/jsoncpp_test
47+
*.a
4848

4949
# eclipse project files
5050
.project
5151
.cproject
5252
/.settings/
53+
54+
# DS_Store
55+
.DS_Store

.travis.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,38 @@
66
# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11/30925448#30925448
77
# to allow C++11, though we are not yet building with -std=c++11
88

9+
before_install: pyenv global 3.5
910
install:
11+
- if [[ $TRAVIS_OS_NAME == osx ]]; then
12+
brew update;
13+
brew install python3 ninja;
14+
python3 -m venv venv;
15+
source venv/bin/activate;
16+
elif [[ $TRAVIS_OS_NAME == linux ]]; then
17+
wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip;
18+
unzip -q ninja-linux.zip -d build;
19+
fi
20+
- pip3 install meson
1021
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
11-
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
12-
# /usr/bin/clang is our version already, and clang-X.Y does not exist.
13-
#- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
22+
- if [[ $CXX = g++ ]]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
23+
# /usr/bin/clang has a conflict with gcc, so use clang-X.Y.
24+
- if [[ $CXX = clang++ ]]; then export CXX="clang++-3.5" CC="clang-3.5"; fi
1425
- echo ${PATH}
1526
- ls /usr/local
1627
- ls /usr/local/bin
17-
- export PATH=/usr/local/bin:/usr/bin:${PATH}
28+
- export PATH="${PWD}"/build:/usr/local/bin:/usr/bin:${PATH}
1829
- echo ${CXX}
1930
- ${CXX} --version
2031
- which valgrind
2132
addons:
2233
apt:
2334
sources:
2435
- ubuntu-toolchain-r-test
36+
- llvm-toolchain-precise-3.5
2537
packages:
2638
- gcc-4.9
2739
- g++-4.9
28-
- clang
40+
- clang-3.5
2941
- valgrind
3042
os:
3143
- linux
@@ -36,8 +48,9 @@ compiler:
3648
script: ./travis.sh
3749
env:
3850
matrix:
39-
- SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false
40-
- SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE
51+
- LIB_TYPE=static BUILD_TYPE=release
52+
- LIB_TYPE=shared BUILD_TYPE=debug
4153
notifications:
4254
email: false
55+
dist: trusty
4356
sudo: false

AUTHORS

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,111 @@
11
Baptiste Lepilleur <[email protected]>
2+
3+
Aaron Jacobs <[email protected]>
4+
Aaron Jacobs <[email protected]>
5+
Adam Boseley <[email protected]>
6+
Adam Boseley <[email protected]>
7+
Aleksandr Derbenev <[email protected]>
8+
Alexander Gazarov <[email protected]>
9+
Alexander V. Brezgin <[email protected]>
10+
Alexandr Brezgin <[email protected]>
11+
Alexey Kruchinin <[email protected]>
12+
Anton Indrawan <[email protected]>
13+
Baptiste Jonglez <[email protected]>
14+
Baptiste Lepilleur <[email protected]>
15+
Baruch Siach <[email protected]>
16+
Ben Boeckel <[email protected]>
17+
Benjamin Knecht <[email protected]>
18+
Bernd Kuhls <[email protected]>
19+
Billy Donahue <[email protected]>
20+
Braden McDorman <[email protected]>
21+
Brandon Myers <[email protected]>
22+
Brendan Drew <[email protected]>
23+
24+
Chris Gilling <[email protected]>
25+
Christopher Dawes <[email protected]>
26+
Christopher Dunn <[email protected]>
27+
Chuck Atkins <[email protected]>
28+
Cody P Schafer <[email protected]>
29+
Connor Manning <[email protected]>
30+
Cory Quammen <[email protected]>
31+
Cristóvão B da Cruz e Silva <[email protected]>
32+
Daniel Krügler <[email protected]>
33+
34+
Dan Liu <gzliudan>
35+
datadiode <[email protected]>
36+
datadiode <[email protected]>
37+
David Seifert <[email protected]>
38+
David West <[email protected]>
39+
40+
Dmitry Marakasov <[email protected]>
41+
dominicpezzuto <[email protected]>
42+
Don Milham <[email protected]>
43+
44+
45+
Egor Tensin <[email protected]>
46+
eightnoteight <[email protected]>
47+
48+
49+
50+
Florian Meier <[email protected]>
51+
Gaëtan Lehmann <[email protected]>
52+
53+
Gergely Nagy <[email protected]>
54+
Gida Pataki <[email protected]>
55+
56+
Iñaki Baz Castillo <[email protected]>
57+
58+
Jean-Christophe Fillion-Robin <[email protected]>
59+
Jonas Platte <[email protected]>
60+
Jörg Krause <[email protected]>
61+
Keith Lea <[email protected]>
62+
Kevin Grant <[email protected]>
63+
Kirill V. Lyadvinsky <[email protected]>
64+
Kirill V. Lyadvinsky <[email protected]>
65+
Kobi Gurkan <[email protected]>
66+
Magnus Bjerke Vik <[email protected]>
67+
Malay Shah <[email protected]>
68+
69+
Marek Kotewicz <[email protected]>
70+
Mark Lakata <[email protected]>
71+
Mark Zeren <[email protected]>
72+
Martin Buck <[email protected]>
73+
Martyn Gigg <[email protected]>
74+
75+
Matthias Loy <[email protected]>
76+
Merlyn Morgan-Graham <[email protected]>
77+
Michael Shields <[email protected]>
78+
Michał Górny <[email protected]>
79+
Mike Naberezny <[email protected]>
80+
81+
82+
83+
Omkar Wagh <[email protected]>
84+
85+
pavel.pimenov <[email protected]>
86+
Paweł Bylica <[email protected]>
87+
Péricles Lopes Machado <[email protected]>
88+
Peter Spiess-Knafl <[email protected]>
89+
90+
Rémi Verschelde <[email protected]>
91+
92+
Robert Dailey <[email protected]>
93+
Sam Clegg <[email protected]>
94+
selaselah <[email protected]>
95+
96+
97+
Stefan Schweter <[email protected]>
98+
Steffen Kieß <[email protected]>
99+
Steven Hahn <[email protected]>
100+
Stuart Eichert <[email protected]>
101+
SuperManitu <[email protected]>
102+
103+
Tengiz Sharafiev <[email protected]>
104+
Tomasz Maciejewski <[email protected]>
105+
Vicente Olivert Riera <[email protected]>
106+
xiaoyur347 <[email protected]>
107+
108+
109+
Yu Xiaolei <[email protected]>
110+
111+
Google Inc.

CMakeLists.txt

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vim: et ts=4 sts=4 sw=4 tw=0
22

3-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
3+
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
44
PROJECT(jsoncpp)
55
ENABLE_TESTING()
66

@@ -27,20 +27,10 @@ IF(APPLE)
2727
SET(CMAKE_MACOSX_RPATH 1)
2828
ENDIF()
2929

30+
# Adhere to GNU filesystem layout conventions
31+
INCLUDE(GNUInstallDirs)
32+
3033
SET(DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build")
31-
SET(LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory")
32-
33-
SET(RUNTIME_INSTALL_DIR bin
34-
CACHE PATH "Install dir for executables and dlls")
35-
SET(ARCHIVE_INSTALL_DIR lib${LIB_SUFFIX}
36-
CACHE PATH "Install dir for static libraries")
37-
SET(LIBRARY_INSTALL_DIR lib${LIB_SUFFIX}
38-
CACHE PATH "Install dir for shared libraries")
39-
SET(INCLUDE_INSTALL_DIR include
40-
CACHE PATH "Install dir for headers")
41-
SET(PACKAGE_INSTALL_DIR lib${LIB_SUFFIX}/cmake
42-
CACHE PATH "Install dir for cmake package config files")
43-
MARK_AS_ADVANCED( RUNTIME_INSTALL_DIR ARCHIVE_INSTALL_DIR INCLUDE_INSTALL_DIR PACKAGE_INSTALL_DIR )
4434

4535
# Set variable named ${VAR_NAME} to value ${VALUE}
4636
FUNCTION(set_using_dynamic_name VAR_NAME VALUE)
@@ -69,12 +59,12 @@ ENDMACRO()
6959
#SET( JSONCPP_VERSION_MAJOR X )
7060
#SET( JSONCPP_VERSION_MINOR Y )
7161
#SET( JSONCPP_VERSION_PATCH Z )
72-
SET( JSONCPP_VERSION 1.7.7 )
62+
SET( JSONCPP_VERSION 1.8.3 )
7363
jsoncpp_parse_version( ${JSONCPP_VERSION} JSONCPP_VERSION )
7464
#IF(NOT JSONCPP_VERSION_FOUND)
7565
# MESSAGE(FATAL_ERROR "Failed to parse version string properly. Expect X.Y.Z")
7666
#ENDIF(NOT JSONCPP_VERSION_FOUND)
77-
SET( JSONCPP_SOVERSION 11 )
67+
SET( JSONCPP_SOVERSION 19 )
7868
SET( JSONCPP_USE_SECURE_MEMORY "0" CACHE STRING "-D...=1 to use memory-wiping allocator for STL" )
7969

8070
MESSAGE(STATUS "JsonCpp Version: ${JSONCPP_VERSION_MAJOR}.${JSONCPP_VERSION_MINOR}.${JSONCPP_VERSION_PATCH}")
@@ -86,70 +76,79 @@ CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/version.in"
8676
"${PROJECT_SOURCE_DIR}/version"
8777
NEWLINE_STYLE UNIX )
8878

89-
macro(UseCompilationWarningAsError)
90-
if ( MSVC )
79+
MACRO(UseCompilationWarningAsError)
80+
IF(MSVC)
9181
# Only enabled in debug because some old versions of VS STL generate
9282
# warnings when compiled in release configuration.
93-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX ")
94-
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
95-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
96-
if (JSONCPP_WITH_STRICT_ISO)
97-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
98-
endif ()
99-
endif()
100-
endmacro()
83+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX ")
84+
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
85+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
86+
IF(JSONCPP_WITH_STRICT_ISO)
87+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
88+
ENDIF()
89+
ENDIF()
90+
ENDMACRO()
10191

10292
# Include our configuration header
10393
INCLUDE_DIRECTORIES( ${jsoncpp_SOURCE_DIR}/include )
10494

105-
if ( MSVC )
95+
IF(MSVC)
10696
# Only enabled in debug because some old versions of VS STL generate
10797
# unreachable code warning when compiled in release configuration.
108-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W4 ")
109-
endif()
110-
111-
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
112-
# using regular Clang or AppleClang
113-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Werror=conversion -Werror=sign-compare")
114-
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
115-
# using GCC
116-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra")
117-
# not yet ready for -Wsign-conversion
118-
119-
if (JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
120-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion -pedantic")
121-
endif ()
122-
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
123-
# using Intel compiler
124-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra -Werror=conversion")
125-
126-
if (JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
127-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
128-
endif ()
129-
endif()
130-
131-
find_program(CCACHE_FOUND ccache)
132-
if(CCACHE_FOUND)
133-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
134-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
135-
endif(CCACHE_FOUND)
98+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W4 ")
99+
ENDIF()
100+
101+
# Require C++11 support, prefer ISO C++ over GNU variants,
102+
# as relying solely on ISO C++ is more portable.
103+
SET(CMAKE_CXX_STANDARD 11)
104+
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
105+
SET(CMAKE_CXX_EXTENSIONS OFF)
106+
107+
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
108+
# using regular Clang or AppleClang
109+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wconversion -Wshadow -Werror=conversion -Werror=sign-compare")
110+
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
111+
# using GCC
112+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wconversion -Wshadow -Wextra")
113+
# not yet ready for -Wsign-conversion
114+
115+
IF(JSONCPP_WITH_STRICT_ISO)
116+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
117+
ENDIF()
118+
IF(JSONCPP_WITH_WARNING_AS_ERROR)
119+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion")
120+
ENDIF()
121+
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
122+
# using Intel compiler
123+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wconversion -Wshadow -Wextra -Werror=conversion")
124+
125+
IF(JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
126+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
127+
ENDIF()
128+
ENDIF()
129+
130+
FIND_PROGRAM(CCACHE_FOUND ccache)
131+
IF(CCACHE_FOUND)
132+
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
133+
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
134+
ENDIF(CCACHE_FOUND)
136135

137136
IF(JSONCPP_WITH_WARNING_AS_ERROR)
138137
UseCompilationWarningAsError()
139138
ENDIF()
140139

141140
IF(JSONCPP_WITH_PKGCONFIG_SUPPORT)
142-
CONFIGURE_FILE(
143-
"pkg-config/jsoncpp.pc.in"
144-
"pkg-config/jsoncpp.pc"
145-
@ONLY)
146-
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkg-config/jsoncpp.pc"
147-
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
141+
CONFIGURE_FILE(
142+
"pkg-config/jsoncpp.pc.in"
143+
"pkg-config/jsoncpp.pc"
144+
@ONLY)
145+
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkg-config/jsoncpp.pc"
146+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
148147
ENDIF()
149148

150149
IF(JSONCPP_WITH_CMAKE_PACKAGE)
151150
INSTALL(EXPORT jsoncpp
152-
DESTINATION ${PACKAGE_INSTALL_DIR}/jsoncpp
151+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/jsoncpp
153152
FILE jsoncppConfig.cmake)
154153
ENDIF()
155154

0 commit comments

Comments
 (0)