mfontanini / cppkafka

Modern C++ Apache Kafka client library (wrapper for librdkafka)
BSD 2-Clause "Simplified" License
589 stars 207 forks source link

update CMakeList.txt #223

Closed chujiangke closed 4 years ago

chujiangke commented 4 years ago

update examples CMakeList.txt

accelerated commented 4 years ago

Hi @chujiangke what is the reason for this change? By adding executables directly they will appear as targets in your makefile which is what @mfontanini doesn't want. Also there is no linking provided for each target and the dependency should be on RdKafka::rdkafka imported library not ${RDKAFKA_LIBRARY} directly.

chujiangke commented 4 years ago

because Ubuntu can't build the example, so I change it。

accelerated commented 4 years ago

Could you post the error you're getting? This PR is definitely not the way to go.

chujiangke commented 4 years ago

cmakelist write like below ‘’‘create_example(producer) create_example(buffered_producer) create_example(consumer) create_example(consumer_dispatcher) create_example(metadata) create_example(consumers_information)’

do cmake . make

and example make nothing , so i change it , it works well.

accelerated commented 4 years ago

You need to explicitly call make examples and it will work. By default examples are not part of make all

chujiangke commented 4 years ago

oh thinks 。