diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
commit | 3c315f0fff93aa072472abc10815963ac0035268 (patch) | |
tree | a95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /CMakeLists.txt | |
parent | Adding upstream version 1.35.1. (diff) | |
download | netdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz netdata-3c315f0fff93aa072472abc10815963ac0035268.zip |
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 137 |
1 files changed, 110 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 378e8a683..9752f3718 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,20 +102,7 @@ set(NETDATA_COMMON_INCLUDE_DIRS ${NETDATA_COMMON_INCLUDE_DIRS} ${LIBLZ4_INCLUDE_ # ----------------------------------------------------------------------------- # Judy General purpose dynamic array -# pkgconfig not working in Ubuntu, why? upstream package broken? -#pkg_check_modules(JUDY REQUIRED Judy) -#set(NETDATA_COMMON_CFLAGS ${NETDATA_COMMON_CFLAGS} ${JUDY_CFLAGS_OTHER}) -#set(NETDATA_COMMON_LIBRARIES ${NETDATA_COMMON_LIBRARIES} ${JUDY_LIBRARIES}) -#set(NETDATA_COMMON_INCLUDE_DIRS ${NETDATA_COMMON_INCLUDE_DIRS} ${JUDY_INCLUDE_DIRS}) -set(NETDATA_COMMON_LIBRARIES ${NETDATA_COMMON_LIBRARIES} "-lJudy") -set(CMAKE_REQUIRED_LIBRARIES "Judy") -include(CheckSymbolExists) -check_symbol_exists("JudyLLast" "Judy.h" HAVE_JUDY) -IF(HAVE_JUDY) - message(STATUS "Judy library found") -ELSE() - message( FATAL_ERROR "libJudy required but not found. Try installing 'libjudy-dev' or 'Judy-devel'." ) -ENDIF() +set(NETDATA_COMMON_LIBRARIES ${NETDATA_COMMON_LIBRARIES} judy) # ----------------------------------------------------------------------------- # OpenSSL Cryptography and SSL/TLS Toolkit @@ -362,6 +349,88 @@ ELSE() set(ENABLE_ML False) ENDIF() +set(LIBJUDY_SOURCES + libnetdata/libjudy/src/Judy.h + libnetdata/libjudy/src/JudyCommon/JudyMalloc.c + libnetdata/libjudy/src/JudyCommon/JudyPrivate.h + libnetdata/libjudy/src/JudyCommon/JudyPrivate1L.h + libnetdata/libjudy/src/JudyCommon/JudyPrivateBranch.h + libnetdata/libjudy/src/JudyL/JudyL.h + libnetdata/libjudy/src/JudyL/JudyLByCount.c + libnetdata/libjudy/src/JudyL/JudyLCascade.c + libnetdata/libjudy/src/JudyL/JudyLCount.c + libnetdata/libjudy/src/JudyL/JudyLCreateBranch.c + libnetdata/libjudy/src/JudyL/JudyLDecascade.c + libnetdata/libjudy/src/JudyL/JudyLDel.c + libnetdata/libjudy/src/JudyL/JudyLFirst.c + libnetdata/libjudy/src/JudyL/JudyLFreeArray.c + libnetdata/libjudy/src/JudyL/j__udyLGet.c + libnetdata/libjudy/src/JudyL/JudyLGet.c + libnetdata/libjudy/src/JudyL/JudyLInsArray.c + libnetdata/libjudy/src/JudyL/JudyLIns.c + libnetdata/libjudy/src/JudyL/JudyLInsertBranch.c + libnetdata/libjudy/src/JudyL/JudyLMallocIF.c + libnetdata/libjudy/src/JudyL/JudyLMemActive.c + libnetdata/libjudy/src/JudyL/JudyLMemUsed.c + libnetdata/libjudy/src/JudyL/JudyLNext.c + libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c + libnetdata/libjudy/src/JudyL/JudyLPrev.c + libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c + JudyLTables.c + libnetdata/libjudy/src/JudyHS/JudyHS.c) + +ADD_LIBRARY(judy STATIC + ${LIBJUDY_SOURCES}) + +ADD_EXECUTABLE(judyltablesgen + libnetdata/libjudy/src/JudyL/JudyLTablesGen.c) + +target_include_directories(judyltablesgen PUBLIC + libnetdata/libjudy/src + libnetdata/libjudy/src/JudyCommon) + +target_compile_options(judyltablesgen PUBLIC + -Wno-format + -Wno-format-security) + +include_directories(BEFORE ${CMAKE_SOURCE_DIR}/libnetdata/libjudy/src) + +target_compile_definitions(judyltablesgen PUBLIC + JU_64BIT + JUDYL) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/JudyLTables.c + COMMAND judyltablesgen + DEPENDS judyltablesgen + ) + +target_include_directories(judy PUBLIC + libnetdata/libjudy/src + libnetdata/libjudy/src/JudyCommon) + +target_compile_definitions(judy PUBLIC + JU_64BIT + JUDYL) + +target_compile_options(judy PUBLIC + -Wno-sign-compare + -Wno-implicit-fallthrough) + +set(LIBJUDY_PREV_FILES + libnetdata/libjudy/src/JudyL/JudyLPrev.c + libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c) + +set(LIBJUDY_NEXT_FILES + libnetdata/libjudy/src/JudyL/JudyLNext.c + libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c) + +set_source_files_properties(${LIBJUDY_PREV_FILES} PROPERTIES COMPILE_OPTIONS "-DJUDYPREV") +set_source_files_properties(${LIBJUDY_NEXT_FILES} PROPERTIES COMPILE_OPTIONS "-DJUDYNEXT") +set_source_files_properties(libnetdata/libjudy/src/JudyL/j__udyLGet.c PROPERTIES COMPILE_OPTIONS "-DJUDYGETINLINE") +set_source_files_properties(libnetdata/libjudy/src/JudyL/JudyLByCount.c PROPERTIES COMPILE_OPTIONS "-DNOSMARTJBB -DNOSMARTJBU -DNOSMARTJLB") +set_source_files_properties(JudyLTables.c PROPERTIES COMPILE_OPTIONS "-I${CMAKE_SOURCE_DIR}/libnetdata/libjudy/src/JudyL") + # ----------------------------------------------------------------------------- # netdata files @@ -370,6 +439,8 @@ set(LIBNETDATA_FILES libnetdata/adaptive_resortable_list/adaptive_resortable_list.h libnetdata/config/appconfig.c libnetdata/config/appconfig.h + libnetdata/arrayalloc/arrayalloc.c + libnetdata/arrayalloc/arrayalloc.h libnetdata/avl/avl.c libnetdata/avl/avl.h libnetdata/buffer/buffer.c @@ -639,6 +710,8 @@ set(RRD_PLUGIN_FILES database/rrdcalc.h database/rrdcalctemplate.c database/rrdcalctemplate.h + database/rrdcontext.c + database/rrdcontext.h database/rrddim.c database/rrddimvar.c database/rrddimvar.h @@ -658,6 +731,10 @@ set(RRD_PLUGIN_FILES database/ram/rrddim_mem.h database/sqlite/sqlite_functions.c database/sqlite/sqlite_functions.h + database/sqlite/sqlite_context.c + database/sqlite/sqlite_context.h + database/sqlite/sqlite_db_migration.c + database/sqlite/sqlite_db_migration.h database/sqlite/sqlite_aclk.c database/sqlite/sqlite_aclk.h database/sqlite/sqlite_health.c @@ -697,8 +774,6 @@ set(RRD_PLUGIN_FILES database/engine/metadata_log/compaction.h database/KolmogorovSmirnovDist.c database/KolmogorovSmirnovDist.h - database/metric_correlations.c - database/metric_correlations.h ) set(WEB_PLUGIN_FILES @@ -727,6 +802,8 @@ set(API_PLUGIN_FILES web/api/queries/query.h web/api/queries/average/average.c web/api/queries/average/average.h + web/api/queries/countif/countif.c + web/api/queries/countif/countif.h web/api/queries/incremental_sum/incremental_sum.c web/api/queries/incremental_sum/incremental_sum.h web/api/queries/max/max.c @@ -737,12 +814,18 @@ set(API_PLUGIN_FILES web/api/queries/sum/sum.h web/api/queries/median/median.c web/api/queries/median/median.h + web/api/queries/percentile/percentile.c + web/api/queries/percentile/percentile.h web/api/queries/stddev/stddev.c web/api/queries/stddev/stddev.h web/api/queries/ses/ses.c web/api/queries/ses/ses.h web/api/queries/des/des.c web/api/queries/des/des.h + web/api/queries/trimmed_mean/trimmed_mean.c + web/api/queries/trimmed_mean/trimmed_mean.h + web/api/queries/weights.c + web/api/queries/weights.h web/api/formatters/rrd2json.c web/api/formatters/rrd2json.h web/api/formatters/csv/csv.c @@ -783,11 +866,6 @@ set(ACLK_ALWAYS_BUILD aclk/aclk_proxy.h ) -set(ACLK_COMMON_FILES - aclk/aclk_collector_list.c - aclk/aclk_collector_list.h - ) - set(ACLK_FILES aclk/aclk.c aclk/aclk.h @@ -811,6 +889,8 @@ set(ACLK_FILES aclk/aclk_charts_api.h aclk/aclk_alarm_api.c aclk/aclk_alarm_api.h + aclk/aclk_contexts_api.c + aclk/aclk_contexts_api.h mqtt_websockets/src/mqtt_wss_client.c mqtt_websockets/src/include/mqtt_wss_client.h mqtt_websockets/src/mqtt_wss_log.c @@ -845,6 +925,12 @@ set(ACLK_FILES aclk/schema-wrappers/node_info.h aclk/schema-wrappers/capability.cc aclk/schema-wrappers/capability.h + aclk/schema-wrappers/proto_2_json.cc + aclk/schema-wrappers/proto_2_json.h + aclk/schema-wrappers/context_stream.cc + aclk/schema-wrappers/context_stream.h + aclk/schema-wrappers/context.cc + aclk/schema-wrappers/context.h aclk/schema-wrappers/schema_wrappers.h aclk/schema-wrappers/schema_wrapper_utils.cc aclk/schema-wrappers/schema_wrapper_utils.h @@ -1159,6 +1245,8 @@ set(ACLK_PROTO_DEFS aclk/aclk-schemas/proto/nodeinstance/connection/v1/connection.proto aclk/aclk-schemas/proto/nodeinstance/create/v1/creation.proto aclk/aclk-schemas/proto/nodeinstance/info/v1/info.proto + aclk/aclk-schemas/proto/context/v1/context.proto + aclk/aclk-schemas/proto/context/v1/stream.proto ) PROTOBUF_ACLK_GENERATE_CPP(ACLK_PROTO_BUILT_SRCS ACLK_PROTO_BUILT_HDRS ${ACLK_PROTO_DEFS}) @@ -1168,7 +1256,6 @@ list(APPEND NETDATA_COMMON_CFLAGS ${PROTOBUF_CFLAGS_OTHER}) list(APPEND NETDATA_FILES ${ACLK_ALWAYS_BUILD}) list(APPEND NETDATA_FILES ${TIMEX_PLUGIN_FILES}) list(APPEND NETDATA_FILES ${ACLK_FILES} ${ACLK_PROTO_BUILT_SRCS} ${ACLK_PROTO_BUILT_HDRS}) -list(APPEND NETDATA_FILES ${ACLK_COMMON_FILES}) include_directories(BEFORE ${CMAKE_SOURCE_DIR}/aclk/aclk-schemas) include_directories(BEFORE ${CMAKE_SOURCE_DIR}/mqtt_websockets/MQTT-C/include) include_directories(BEFORE ${CMAKE_SOURCE_DIR}/mqtt_websockets/src/include) @@ -1412,6 +1499,7 @@ if(BUILD_TESTING) exporting/tests/exporting_doubles.c exporting/tests/netdata_doubles.c exporting/tests/system_doubles.c + database/rrdlabels.c ) set(TEST_NAME exporting_engine) set(PROMETHEUS_REMOTE_WRITE_LINK_OPTIONS) @@ -1569,11 +1657,6 @@ endif() database/rrd.h ) add_executable(cgroups_testdriver ${CGROUPS_TEST_FILES} ${CGROUPS_PLUGIN_FILES}) - target_link_options( - cgroups_testdriver - PRIVATE - -Wl,--wrap=add_label_to_list - ) target_link_libraries(cgroups_testdriver libnetdata ${NETDATA_COMMON_LIBRARIES} ${CMOCKA_LIBRARIES}) add_test(NAME test_cgroups COMMAND cgroups_testdriver) |