From 0131841787e3408cbe9348597c132e02c80ead01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sun, 5 Nov 2017 19:24:56 +0200 Subject: [PATCH] Fix dbfwfilter and cachetester dependencies The two depended on the PCRE2 and Connector-C libraries which means that the libraries need to be built first. This information needs to be told to CMake with the add_dependency call. --- server/modules/filter/cache/test/CMakeLists.txt | 3 +++ server/modules/filter/dbfwfilter/CMakeLists.txt | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/server/modules/filter/cache/test/CMakeLists.txt b/server/modules/filter/cache/test/CMakeLists.txt index 0d76963a7..d06bab438 100644 --- a/server/modules/filter/cache/test/CMakeLists.txt +++ b/server/modules/filter/cache/test/CMakeLists.txt @@ -9,6 +9,9 @@ add_library(cachetester ../../../../../query_classifier/test/testreader.cc ) +# Depends on C/C +add_dependencies(cachetester connector-c) + add_executable(testrules testrules.cc ../rules.cc) target_link_libraries(testrules maxscale-common ${JANSSON_LIBRARIES}) diff --git a/server/modules/filter/dbfwfilter/CMakeLists.txt b/server/modules/filter/dbfwfilter/CMakeLists.txt index 13458091d..6d7ac2573 100644 --- a/server/modules/filter/dbfwfilter/CMakeLists.txt +++ b/server/modules/filter/dbfwfilter/CMakeLists.txt @@ -7,6 +7,10 @@ if(BISON_FOUND AND FLEX_FOUND) include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_library(dbfwfilter-core STATIC ${BISON_ruleparser_OUTPUTS} ${FLEX_token_OUTPUTS} rules.cc user.cc) + + # Depends on PCRE2 + add_dependencies(dbfwfilter-core pcre2 connector-c) + add_library(dbfwfilter SHARED dbfwfilter.cc) target_link_libraries(dbfwfilter maxscale-common MySQLCommon dbfwfilter-core) set_target_properties(dbfwfilter PROPERTIES VERSION "1.0.0")