Skip to content

Commit 950e5e2

Browse files
committed
Try to restore travis build.
1 parent 6d29890 commit 950e5e2

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
bench
22
vpack-to-json
33
json-to-vpack
4+
taocpp-json
45
core
56
AsmTest
67
*.o

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ matrix:
6161
- build_type=Release
6262
- SANITIZER=true
6363
- CXX_STANDARD=17
64+
- TAO=ON
6465

6566
- name: "coverage build"
6667
if: branch = master
@@ -92,6 +93,7 @@ matrix:
9293
#build settings
9394
- build_type=Release
9495
- CXX_STANDARD=17
96+
- TAO=ON
9597
addons:
9698
apt:
9799
sources:
@@ -105,12 +107,16 @@ matrix:
105107
compiler: clang
106108
env:
107109
- build_type=Release
110+
- TAO=ON
108111

109112
install:
113+
- git clone https://github.com/taocpp/json.git taocpp-json
114+
- ( cd taocpp-json; git checkout 631095f4bfa45c63af5ccc1cb35ea16eb9ead450; )
110115
- export CXX=$CXX
111116
- export CC=$CC
112117
- export CXX_STANDARD=${CXX_STANDARD:-17}
113118
- export BUILD_TYPE=${build_type}
119+
- export TAO=${TAO:-OFF}
114120
- cmake --version
115121
- $CXX --version
116122

CMakeLists.txt

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo
1111

1212
option(BuildVelocyPackExamples "Build examples" ON)
1313
option(Maintainer "Build maintainer tools" OFF)
14+
option(TaoJson "Add support for taocpp::json" OFF)
15+
16+
if(TaoJson)
17+
if(NOT TARGET taocpp::json)
18+
set(TAOCPP_JSON_BUILD_TESTS OFF CACHE BOOL "Build test programs" FORCE)
19+
set(TAOCPP_JSON_BUILD_EXAMPLES OFF CACHE BOOL "Build example programs" FORCE)
20+
add_subdirectory(taocpp-json EXCLUDE_FROM_ALL)
21+
endif()
22+
endif()
1423

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

@@ -44,7 +53,7 @@ set(VELOCY_SOURCE
4453
src/Iterator.cpp
4554
src/Options.cpp
4655
src/Parser.cpp
47-
src/TaoParser.cpp
56+
$<$<BOOL:${TaoJson}>:src/TaoParser.cpp>
4857
src/Serializable.cpp
4958
src/Slice.cpp
5059
src/SliceStaticData.cpp
@@ -80,6 +89,7 @@ message(STATUS "Building with hash type: ${HashType}")
8089
add_library(velocypack STATIC ${VELOCY_SOURCE})
8190
target_include_directories(velocypack PRIVATE src)
8291
target_include_directories(velocypack PUBLIC include)
92+
target_link_libraries(velocypack PUBLIC $<$<BOOL:${TaoJson}>:taocpp::json>)
8393

8494
if(Maintainer)
8595
add_executable(buildVersion scripts/build-version.cpp)

scripts/travis-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mkdir -p build && cd build || ferr "could not create build dir"
2121

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

0 commit comments

Comments
 (0)