diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 01b88afaba75aef3d9045472aa2fd6fdc074cffe..3eea7e466b169954de8a96ddfa892ca551e82a40 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -20,7 +20,7 @@ jobs: run: | cd argon2 && make && sudo make install && cd .. - name: configure - run: ./configure + run: ./configure --enable-proxy-client --enable-proxy-server --enable-push-notifications - name: make run: make - name: make check diff --git a/CMakeLists.txt b/CMakeLists.txt index b8fc2b35927fd69c8ab2b68a67fe19fc8dc48fb5..a6642cc7cdc84c25328b165a231225701e764fdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ option (OPENDHT_PROXY_SERVER_IDENTITY "Allow clients to use the node identity" O option (OPENDHT_PROXY_CLIENT "Enable DHT proxy client, use Restinio and jsoncpp" OFF) option (OPENDHT_PROXY_OPENSSL "Build DHT proxy with OpenSSL" ON) option (OPENDHT_PROXY_HTTP_PARSER_FORK "Build DHT proxy with custom http_parser to support old API" OFF) +option (OPENDHT_PEER_DISCOVERY "Enable multicast peer discovery" ON) option (OPENDHT_INDEX "Build DHT indexation feature" OFF) option (OPENDHT_TESTS "Add unit tests executable" OFF) option (OPENDHT_C "Build C bindings" OFF) @@ -177,7 +178,6 @@ list (APPEND opendht_SOURCES src/securedht.cpp src/dhtrunner.cpp src/log.cpp - src/peer_discovery.cpp src/network_utils.cpp src/thread_pool.cpp ) @@ -203,12 +203,17 @@ list (APPEND opendht_HEADERS include/opendht/securedht.h include/opendht/log.h include/opendht/log_enable.h - include/opendht/peer_discovery.h include/opendht/thread_pool.h include/opendht/network_utils.h include/opendht.h ) +if (OPENDHT_PEER_DISCOVERY) + list (APPEND opendht_SOURCES src/peer_discovery.cpp) + list (APPEND opendht_HEADERS include/opendht/peer_discovery.h) + add_definitions(-DOPENDHT_PEERDISCOVERY) +endif() + if (OPENDHT_PYTHON) message("Indexation enabled since it is required for Python support") set(OPENDHT_INDEX ON) @@ -392,6 +397,12 @@ if (OPENDHT_TESTS) tests/dhtproxytester.cpp ) endif() + if (OPENDHT_PEER_DISCOVERY) + list (APPEND test_FILES + tests/peerdiscoverytester.h + tests/peerdiscoverytester.cpp + ) + endif() add_executable(opendht_unit_tests tests/tests_runner.cpp ${test_FILES} diff --git a/tests/compile_http.sh b/tests/compile_http.sh deleted file mode 100755 index 0f2e1a08b2f8acf860f3b3c5000c6779ac6fdb94..0000000000000000000000000000000000000000 --- a/tests/compile_http.sh +++ /dev/null @@ -1 +0,0 @@ -g++ -Wall -Wextra -Wfatal-errors -pedantic -g ../src/http.cpp tests_runner.cpp httptester.cpp -o run.out -lopendht -lpthread -lcppunit -ljsoncpp -DOPENDHT_JSONCPP -I../include/opendht -DASIO_STANDALONE