diff --git a/CMakeLists.txt b/CMakeLists.txt index 28293cc..a74ca89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,18 +29,6 @@ endif() find_package(Boost REQUIRED) find_package(RdKafka REQUIRED) -if (HAVE_OFFSETS_FOR_TIMES) - message(STATUS "Enabling support for KafkaHandleBase::get_offsets_for_times") - set(CPPKAFKA_HAVE_OFFSET_FOR_TIMES ON) -else() - message(STATUS "Disabling support for KafkaHandleBase::get_offsets_for_times") -endif() -# Configuration file -configure_file( - "${PROJECT_SOURCE_DIR}/include/cppkafka/config.h.in" - "${PROJECT_SOURCE_DIR}/include/cppkafka/config.h" -) - add_subdirectory(src) add_subdirectory(include) diff --git a/cmake/FindRdKafka.cmake b/cmake/FindRdKafka.cmake index 50182a4..121a4f9 100644 --- a/cmake/FindRdKafka.cmake +++ b/cmake/FindRdKafka.cmake @@ -23,8 +23,7 @@ find_package_handle_standard_args(RDKAFKA DEFAULT_MSG include(CheckFunctionExists) set(CMAKE_REQUIRED_LIBRARIES ${RDKAFKA_LIBRARY}) -check_function_exists(rd_kafka_committed HAVE_VALID_KAFKA_VERSION) -check_function_exists(rd_kafka_offsets_for_times HAVE_OFFSETS_FOR_TIMES) +check_function_exists(rd_kafka_offsets_for_times HAVE_VALID_KAFKA_VERSION) set(CMAKE_REQUIRED_LIBRARIES) if (HAVE_VALID_KAFKA_VERSION) diff --git a/include/cppkafka/config.h.in b/include/cppkafka/config.h.in deleted file mode 100644 index c0d69c3..0000000 --- a/include/cppkafka/config.h.in +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CPPKAFKA_CONFIG_H -#define CPPKAFKA_CONFIG_H - -#cmakedefine CPPKAFKA_HAVE_OFFSET_FOR_TIMES - -#endif // CPPKAFKA_CONFIG_H diff --git a/include/cppkafka/kafka_handle_base.h b/include/cppkafka/kafka_handle_base.h index 2017b33..b76f87d 100644 --- a/include/cppkafka/kafka_handle_base.h +++ b/include/cppkafka/kafka_handle_base.h @@ -44,7 +44,6 @@ #include "topic_configuration.h" #include "configuration.h" #include "macros.h" -#include "config.h" namespace cppkafka { @@ -156,8 +155,6 @@ public: */ TopicMetadata get_metadata(const Topic& topic) const; - #ifdef CPPKAFKA_HAVE_OFFSET_FOR_TIMES - /** * \brief Gets topic/partition offsets based on timestamps * @@ -167,8 +164,6 @@ public: */ TopicPartitionList get_offsets_for_times(const TopicPartitionsTimestampsMap& queries) const; - #endif // CPPKAFKA_HAVE_OFFSET_FOR_TIMES - /** * Returns the kafka handle name */ diff --git a/src/kafka_handle_base.cpp b/src/kafka_handle_base.cpp index 341515f..2d269fc 100644 --- a/src/kafka_handle_base.cpp +++ b/src/kafka_handle_base.cpp @@ -119,7 +119,6 @@ TopicMetadata KafkaHandleBase::get_metadata(const Topic& topic) const { return topics.front(); } -#ifdef CPPKAFKA_HAVE_OFFSET_FOR_TIMES TopicPartitionList KafkaHandleBase::get_offsets_for_times(const TopicPartitionsTimestampsMap& queries) const { TopicPartitionList topic_partitions; @@ -134,7 +133,6 @@ KafkaHandleBase::get_offsets_for_times(const TopicPartitionsTimestampsMap& queri check_error(result); return convert(topic_list_handle); } -#endif // CPPKAFKA_HAVE_OFFSET_FOR_TIMES string KafkaHandleBase::get_name() const { return rd_kafka_name(handle_.get());