Skip to content

Commit

Permalink
Merge branch 'upstream' into for-upstream
Browse files Browse the repository at this point in the history
This drops #3 and #4, as their functionality has been superseded
upstream, see Tencent/rapidjson#97 and Tencent/rapidjson#101.

Conflicts:
	include/rapidjson/prettywriter.h
	include/rapidjson/reader.h
	include/rapidjson/writer.h
  • Loading branch information
pah committed Aug 11, 2014
2 parents 1803a78 + 2b27b7f commit 58dca76
Show file tree
Hide file tree
Showing 63 changed files with 10,464 additions and 5,489 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
- CONF=debug
- CONF=release
global:
- GITHUB_REPO='miloyip/rapidjson'
# prepare for 32/64 bit multi-arch support
- BITS=64
- secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
Expand Down
312 changes: 156 additions & 156 deletions build/premake4.lua
Original file line number Diff line number Diff line change
@@ -1,165 +1,165 @@
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
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
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 "-msse4.2 -Werror -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 "-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/**.c",
"../test/perftest/**.h",
}
includedirs {
"../include/",
"../thirdparty/gtest/include/",
"../thirdparty/",
"../thirdparty/jsoncpp/include/",
"../thirdparty/libjson/",
"../thirdparty/yajl/include/",
}

libdirs "../thirdparty/lib"

setTargetObjDir("../bin")

linkLib "gtest"
links "gtest"
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 "-msse4.2 -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/**.c",
"../test/perftest/**.h",
}
includedirs {
"../include/",
"../thirdparty/gtest/include/",
"../thirdparty/",
"../thirdparty/jsoncpp/include/",
"../thirdparty/libjson/",
"../thirdparty/yajl/include/",
}

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
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
36 changes: 27 additions & 9 deletions build/travis-doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ DOXYGEN_TAR=${DOXYGEN_VER}.linux.bin.tar.gz
DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/${DOXYGEN_TAR}"
DOXYGEN_BIN="/usr/local/bin/doxygen"

GHPAGES_REPO="miloyip/rapidjson"
GHPAGES_URL="https://github.com/${GHPAGES_REPO}"
: ${GITHUB_REPO:="miloyip/rapidjson"}
GITHUB_HOST="github.com"
GITHUB_CLONE="git://${GITHUB_HOST}/${GITHUB_REPO}"
GITHUB_URL="https://${GITHUB_HOST}/${GITHUB_PUSH-${GITHUB_REPO}}"

# if not set, ignore password
#GIT_ASKPASS="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh"

skip() {
echo "$@" 1>&2
Expand Down Expand Up @@ -61,11 +66,12 @@ gh_pages_prepare()
cd "${TRAVIS_BUILD_DIR}/doc";
[ ! -d "html" ] || \
abort "Doxygen target directory already exists."
git clone --single-branch -b gh-pages ${GHPAGES_URL} html
git --version
git clone --single-branch -b gh-pages "${GITHUB_CLONE}" html
cd html
# setup git config (with defaults)
git config --global user.name "${GIT_NAME-travis}"
git config --global user.email "${GIT_EMAIL-"travis@localhost"}"
git config user.name "${GIT_NAME-travis}"
git config user.email "${GIT_EMAIL-"travis@localhost"}"
# clean working dir
rm -f .git/index
git clean -df
Expand All @@ -77,6 +83,15 @@ gh_pages_commit() {
git diff-index --quiet HEAD || git commit -m "Automatic doxygen build";
}

gh_setup_askpass() {
cat > ${GIT_ASKPASS} <<EOF
#!/bin/bash
echo
exit 0
EOF
chmod a+x "$GIT_ASKPASS"
}

gh_pages_push() {
# check for secure variables
[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] || \
Expand All @@ -89,11 +104,14 @@ gh_pages_push() {

cd "${TRAVIS_BUILD_DIR}/doc/html";
# setup credentials (hide in "set -x" mode)
git config core.askpass /bin/true
( set +x ; git config credential.${GHPAGES_URL}.username "${GH_TOKEN}" )
git remote set-url --push origin "${GITHUB_URL}"
git config credential.helper 'store'
# ( set +x ; git config credential.username "${GH_TOKEN}" )
( set +x ; [ -f ${HOME}/.git-credentials ] || \
( echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \
chmod go-rw ${HOME}/.git-credentials ) )
# push to GitHub
git push origin gh-pages || \
skip "GitHub pages update failed, temporarily ignored."
git push origin gh-pages
}

doxygen_install
Expand Down
Loading

0 comments on commit 58dca76

Please sign in to comment.