Fix Travis builds
The maxavro requires some special libraries which aren't always available. For this reason, the maxavro library shouldn't be build unless all libraries are available.
This commit is contained in:
parent
891ce2d0e7
commit
7d202eb084
@ -12,9 +12,9 @@ echo TRAVIS_BUILD_DIR: ${TRAVIS_BUILD_DIR}
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=Y
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=Y -DBUILD_AVRO=N
|
||||
|
||||
make VERBOSE=1
|
||||
make
|
||||
make test
|
||||
sudo make install
|
||||
|
||||
|
@ -177,7 +177,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "${DEBUG_FLAGS} -DSS_DEBUG -DLOG_ASSERT")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-ggdb")
|
||||
|
||||
include_directories(avro)
|
||||
include_directories(include)
|
||||
include_directories(server/inih)
|
||||
include_directories(server/modules/include)
|
||||
@ -185,8 +184,10 @@ include_directories(${CMAKE_BINARY_DIR}/include)
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
if (BUILD_AVRO)
|
||||
include_directories(avro)
|
||||
add_subdirectory(avro)
|
||||
endif()
|
||||
|
||||
add_subdirectory(plugins)
|
||||
add_subdirectory(query_classifier)
|
||||
add_subdirectory(server)
|
||||
|
@ -1,8 +1,10 @@
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_library(maxavro maxavro.c maxavro_schema.c maxavro_record.c maxavro_file.c)
|
||||
target_link_libraries(maxavro maxscale-common jansson)
|
||||
if (AVRO_FOUND)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_library(maxavro maxavro.c maxavro_schema.c maxavro_record.c maxavro_file.c)
|
||||
target_link_libraries(maxavro maxscale-common jansson)
|
||||
|
||||
add_executable(maxavrocheck maxavrocheck.c)
|
||||
target_link_libraries(maxavrocheck maxavro)
|
||||
install_executable(maxavrocheck core)
|
||||
add_subdirectory(test)
|
||||
add_executable(maxavrocheck maxavrocheck.c)
|
||||
target_link_libraries(maxavrocheck maxavro)
|
||||
install_executable(maxavrocheck core)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user