Files
MaxScale/server/modules/routing/avrorouter/CMakeLists.txt
Markus Mäkelä 46d1187172 Backport GCC 8 fixes to 2.1
Backported the minimal set of changes required to build 2.1 with GCC
8. The format-truncation and format-overflow warnings are disabled instead
of fixed in 2.1 to remove duplication of effort that was already done in
2.2 (the commit doesn't cherry-pick cleanly).
2018-05-16 11:09:47 +03:00

18 lines
868 B
CMake

if(AVRO_FOUND AND JANSSON_FOUND)
include_directories(${AVRO_INCLUDE_DIR})
include_directories(${JANSSON_INCLUDE_DIR})
add_library(avrorouter SHARED avro.c ../binlogrouter/binlog_common.c avro_client.c avro_schema.c avro_rbr.c avro_file.c avro_index.c)
set_target_properties(avrorouter PROPERTIES VERSION "1.0.0")
set_target_properties(avrorouter PROPERTIES LINK_FLAGS -Wl,-z,defs)
target_link_libraries(avrorouter maxscale-common ${JANSSON_LIBRARIES} ${AVRO_LIBRARIES} maxavro sqlite3 lzma)
install_module(avrorouter core)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-overflow -Wno-format-truncation")
if (BUILD_TESTS)
add_subdirectory(test)
endif()
else()
message(FATAL_ERROR "No Avro C or Jansson libraries found, cannot build avrorouter. "
"Use the -DBUILD_CDC=N option to `cmake` to disable building of the avrorouter.")
endif()