Skip to content

Commit

Permalink
Try to restore travis build.
Browse files Browse the repository at this point in the history
  • Loading branch information
ObiWahn committed Feb 17, 2020
1 parent 6d29890 commit 3e81d5d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
bench
vpack-to-json
json-to-vpack
taocpp-json
core
AsmTest
*.o
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ matrix:
- build_type=Release
- SANITIZER=false
- CXX_STANDARD=17
- TAO=ON
addons:
apt:
packages: ['gcc-8', 'g++-8', 'cmake']
Expand Down Expand Up @@ -92,6 +93,7 @@ matrix:
#build settings
- build_type=Release
- CXX_STANDARD=17
- TAO=ON
addons:
apt:
sources:
Expand All @@ -105,12 +107,16 @@ matrix:
compiler: clang
env:
- build_type=Release
- TAO=ON

install:
- git clone https://github.com/taocpp/json.git taocpp-json
- ( cd taocpp-json; git checkout 631095f4bfa45c63af5ccc1cb35ea16eb9ead450; )
- export CXX=$CXX
- export CC=$CC
- export CXX_STANDARD=${CXX_STANDARD:-17}
- export BUILD_TYPE=${build_type}
- export TAO=${TAO:-OFF}
- cmake --version
- $CXX --version

Expand Down
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo

option(BuildVelocyPackExamples "Build examples" ON)
option(Maintainer "Build maintainer tools" OFF)
option(TaoJson "Add support for taocpp::json" OFF)

if(TaoJson)
if(NOT TARGET taocpp::json)
set(TAOCPP_JSON_BUILD_TESTS OFF CACHE BOOL "Build test programs" FORCE)
set(TAOCPP_JSON_BUILD_EXAMPLES OFF CACHE BOOL "Build example programs" FORCE)
add_subdirectory(taocpp-json EXCLUDE_FROM_ALL)
endif()
endif()

set(HashType "xxhash" CACHE STRING "Hash type (fasthash, xxhash)" )

Expand Down Expand Up @@ -44,7 +53,7 @@ set(VELOCY_SOURCE
src/Iterator.cpp
src/Options.cpp
src/Parser.cpp
src/TaoParser.cpp
$<$<BOOL:${TaoJson}>:src/TaoParser.cpp>
src/Serializable.cpp
src/Slice.cpp
src/SliceStaticData.cpp
Expand Down Expand Up @@ -80,6 +89,7 @@ message(STATUS "Building with hash type: ${HashType}")
add_library(velocypack STATIC ${VELOCY_SOURCE})
target_include_directories(velocypack PRIVATE src)
target_include_directories(velocypack PUBLIC include)
target_link_libraries(velocypack PUBLIC $<$<BOOL:${TaoJson}>:taocpp::json>)

if(Maintainer)
add_executable(buildVersion scripts/build-version.cpp)
Expand Down
3 changes: 2 additions & 1 deletion scripts/travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ if [[ $TRAVIS_OS_NAME == "linux" ]]; then
fi

echo "Building with C++ Standard $CXX_STANDARD"
echo "TaoJson support: $TAO"

mkdir -p build && cd build || ferr "could not create build dir"

cmake -DCMAKE_BUILD_TYPE=Release -DHashType=xxhash \
-DBuildTests=ON -DBuildLargeTests=OFF -DBuildVelocyPackExamples=ON \
-DBuildTools=ON -DEnableSSE=OFF \
-DBuildTools=ON -DEnableSSE=OFF -DTaoJson="$TAO" \
-DCMAKE_CXX_STANDARD=${CXX_STANDARD} \
.. || ferr "failed to configure"

Expand Down

0 comments on commit 3e81d5d

Please sign in to comment.