Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
40c03114
Commit
40c03114
authored
Nov 11, 2014
by
Andriy Senkovych
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try new travis configuration
parent
bff9625e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
200 deletions
+37
-200
.travis.yml
.travis.yml
+19
-20
CMakeLists.txt
CMakeLists.txt
+11
-1
premake.bat
build/premake.bat
+0
-6
premake.sh
build/premake.sh
+0
-5
premake4.lua
build/premake4.lua
+0
-161
readme.md
readme.md
+2
-2
travis-doxygen.sh
travis-doxygen.sh
+5
-5
No files found.
.travis.yml
View file @
40c03114
...
...
@@ -6,36 +6,35 @@ compiler:
env
:
matrix
:
-
CONF=debug
BITS=64
-
CONF=release
BITS=64
-
CONF=debug
BITS=32
-
CONF=release
BITS=32
-
CONF=debug
ARCH=x86_64 ARCH_FLAGS=""
-
CONF=release
ARCH=x86_64 ARCH_FLAGS=""
-
CONF=debug
ARCH=x86 ARCH_FLAGS="-m32"
-
CONF=release
ARCH=x86 ARCH_FLAGS="-m32"
global
:
-
GITHUB_REPO='miloyip/rapidjson'
-
DEFINES='-DRAPIDJSON_HAS_STDSTRING'
-
secure
:
"
HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
before_install
:
-
sudo add-apt-repository -y ppa:codegear/release
-
sudo apt-get update -qq
-
sudo apt-get install -qq premake4 valgrind
-
if [ "$BITS" = 32 ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi
-
sudo apt-get install -qq cmake doxygen valgrind
-
if [ "$ARCH" = "x86" ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi
install
:
true
before_script
:
-
(cd build && premake4 'gmake')
-
mkdir build
-
>
(cd build && cmake
-DRAPIDJSON_HAS_STDSTRING=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$CONF
-DCMAKE_C_FLAGS="$ARCH_FLAGS" ..)
# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469),
# exposed by merging PR#163 (using -march=native)
-
(cd build/gmake && sed -i 's/march=native/msse4.2/' *.make)
#
- (cd build/gmake && sed -i 's/march=native/msse4.2/' *.make)
script
:
-
make -C build/gmake -f test.make config=${CONF}${BITS}
-
make -C build/gmake -f example.make config=${CONF}${BITS}
-
if [ "$CONF" = "debug" ] && ( objdump -t -C intermediate/${CONF}/gmake/unittest/x${BITS}/namespacetest.o | grep rapidjson ) ; then echo "Symbol check failed!" ;
false
; fi
-
pushd bin
-
./unittest_${CONF}_x${BITS}_gmake
-
valgrind --leak-check=full --error-exitcode=1 ./unittest_${CONF}_x${BITS}_gmake
-
if [ "$CONF" = "release" ]; then ./perftest_${CONF}_x${BITS}_gmake; fi
-
popd
-
./build/travis-doxygen.sh;
-
cd build
-
make tests
-
make examples
-
ctest -V
-
make travis_doc
CMakeLists.txt
View file @
40c03114
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
.11
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
SET
(
CMAKE_MODULE_PATH
${
CMAKE_SOURCE_DIR
}
/CMakeModules
)
PROJECT
(
RapidJSON CXX
)
...
...
@@ -18,6 +18,12 @@ 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_HAS_STDSTRING
""
OFF
)
if
(
RAPIDJSON_HAS_STDSTRING
)
add_definitions
(
-DRAPIDJSON_HAS_STDSTRING
)
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"
)
...
...
@@ -38,6 +44,10 @@ 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
()
...
...
build/premake.bat
deleted
100644 → 0
View file @
bff9625e
@echo off
premake4 vs2005
premake4 vs2008
premake4 vs2010
premake4 gmake
\ No newline at end of file
build/premake.sh
deleted
100755 → 0
View file @
bff9625e
#!/bin/sh
premake4 vs2005
premake4 vs2008
premake4 vs2010
premake4 gmake
build/premake4.lua
deleted
100644 → 0
View file @
bff9625e
function
setTargetObjDir
(
outDir
)
for
_
,
cfg
in
ipairs
(
configurations
())
do
for
_
,
plat
in
ipairs
(
platforms
())
do
local
action
=
_ACTION
or
""
local
prj
=
project
()
--"_debug_win32_vs2008"
local
suffix
=
"_"
..
cfg
..
"_"
..
plat
..
"_"
..
action
targetPath
=
outDir
suffix
=
string.lower
(
suffix
)
local
obj_path
=
"../intermediate/"
..
cfg
..
"/"
..
action
..
"/"
..
prj
.
name
obj_path
=
string.lower
(
obj_path
)
configuration
{
cfg
,
plat
}
targetdir
(
targetPath
)
objdir
(
obj_path
)
targetsuffix
(
suffix
)
end
end
end
function
linkLib
(
libBaseName
)
for
_
,
cfg
in
ipairs
(
configurations
())
do
for
_
,
plat
in
ipairs
(
platforms
())
do
local
action
=
_ACTION
or
""
local
prj
=
project
()
local
cfgName
=
cfg
--"_debug_win32_vs2008"
local
suffix
=
"_"
..
cfgName
..
"_"
..
plat
..
"_"
..
action
libFullName
=
libBaseName
..
string.lower
(
suffix
)
configuration
{
cfg
,
plat
}
links
(
libFullName
)
end
end
end
solution
"test"
configurations
{
"debug"
,
"release"
}
platforms
{
"x32"
,
"x64"
}
location
(
"./"
..
(
_ACTION
or
""
))
language
"C++"
flags
{
"ExtraWarnings"
}
configuration
"debug"
defines
{
"DEBUG"
}
flags
{
"Symbols"
}
configuration
"release"
defines
{
"NDEBUG"
}
flags
{
"Optimize"
}
configuration
"vs*"
defines
{
"_CRT_SECURE_NO_WARNINGS"
}
configuration
"gmake"
buildoptions
"-march=native -Wall -Wextra"
project
"gtest"
kind
"StaticLib"
defines
{
"GTEST_HAS_PTHREAD=0"
}
files
{
"../thirdparty/gtest/src/gtest-all.cc"
,
"../thirdparty/gtest/src/**.h"
,
}
includedirs
{
"../thirdparty/gtest/"
,
"../thirdparty/gtest/include"
,
}
setTargetObjDir
(
"../thirdparty/lib"
)
project
"unittest"
kind
"ConsoleApp"
if
_ACTION
==
"gmake"
then
buildoptions
"-Werror -Weffc++ -Wswitch-default"
end
files
{
"../include/**.h"
,
"../test/unittest/**.cpp"
,
"../test/unittest/**.h"
,
}
includedirs
{
"../include/"
,
"../thirdparty/gtest/include/"
,
}
libdirs
"../thirdparty/lib"
setTargetObjDir
(
"../bin"
)
linkLib
"gtest"
links
"gtest"
project
"perftest"
kind
"ConsoleApp"
files
{
"../include/**.h"
,
"../test/perftest/**.cpp"
,
"../test/perftest/**.h"
,
}
includedirs
{
"../include/"
,
"../thirdparty/gtest/include/"
,
"../thirdparty/"
,
}
libdirs
"../thirdparty/lib"
setTargetObjDir
(
"../bin"
)
linkLib
"gtest"
links
"gtest"
solution
"example"
configurations
{
"debug"
,
"release"
}
platforms
{
"x32"
,
"x64"
}
location
(
"./"
..
(
_ACTION
or
""
))
language
"C++"
flags
{
"ExtraWarnings"
}
includedirs
"../include/"
configuration
"debug"
defines
{
"DEBUG"
}
flags
{
"Symbols"
}
configuration
"release"
defines
{
"NDEBUG"
}
flags
{
"Optimize"
,
"EnableSSE2"
}
configuration
"vs*"
defines
{
"_CRT_SECURE_NO_WARNINGS"
}
configuration
"gmake"
buildoptions
"-Werror -Wall -Wextra -Weffc++ -Wswitch-default"
local
examplepaths
=
os
.
matchdirs
(
"../example/*"
)
for
_
,
examplepath
in
ipairs
(
examplepaths
)
do
project
(
path
.
getname
(
examplepath
))
kind
"ConsoleApp"
files
(
examplepath
..
"/*"
)
setTargetObjDir
(
"../bin"
)
end
readme.md
View file @
40c03114
...
...
@@ -48,8 +48,8 @@ RapidJSON uses following software as its dependencies:
To generate user documentation and run tests please proceed with the steps below:
1.
Execute
`git submodule update --init`
to get the files of thirdparty submodules (google test).
2.
Create directory called
`build`
nearby
rapidjson source directory.
3.
Change to
`build`
directory and run
`cmake ..
/rapidjson
`
command to configure your build. Windows users can do the same with cmake-gui application.
2.
Create directory called
`build`
in
rapidjson source directory.
3.
Change to
`build`
directory and run
`cmake ..`
command to configure your build. Windows users can do the same with cmake-gui application.
4.
On Windows, build the solution found in the build directory. On Linux, run
`make`
from the build directory.
On successfull build you will find compiled test and example binaries in
`bin`
...
...
build/
travis-doxygen.sh
→
travis-doxygen.sh
View file @
40c03114
...
...
@@ -57,13 +57,13 @@ doxygen_install()
doxygen_run
()
{
cd
"
${
TRAVIS_BUILD_DIR
}
"
;
doxygen
build/
Doxyfile
;
cd
"
${
TRAVIS_BUILD_DIR
}
/build/doc
"
;
doxygen Doxyfile
;
}
gh_pages_prepare
()
{
cd
"
${
TRAVIS_BUILD_DIR
}
/doc"
;
cd
"
${
TRAVIS_BUILD_DIR
}
/
build/
doc"
;
[
!
-d
"html"
]
||
\
abort
"Doxygen target directory already exists."
git
--version
...
...
@@ -78,7 +78,7 @@ gh_pages_prepare()
}
gh_pages_commit
()
{
cd
"
${
TRAVIS_BUILD_DIR
}
/doc/html"
;
cd
"
${
TRAVIS_BUILD_DIR
}
/
build/
doc/html"
;
git add
--all
;
git diff-index
--quiet
HEAD
||
git commit
-m
"Automatic doxygen build"
;
}
...
...
@@ -102,7 +102,7 @@ gh_pages_push() {
[
"
${#
GH_TOKEN
}
"
-eq
40
]
||
\
abort
"GitHub token invalid: found
${#
GH_TOKEN
}
characters, expected 40."
cd
"
${
TRAVIS_BUILD_DIR
}
/doc/html"
;
cd
"
${
TRAVIS_BUILD_DIR
}
/
build/
doc/html"
;
# setup credentials (hide in "set -x" mode)
git remote set-url
--push
origin
"
${
GITHUB_URL
}
"
git config credential.helper
'store'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment