diff --git a/CMakeLists.txt b/CMakeLists.txt index 96e0dc1..79b0c9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,8 +105,7 @@ endif() # Library add_library( - ndt_objects - OBJECT + ndt curlx.cpp curlx.hpp libndt.cpp @@ -115,16 +114,6 @@ add_library( strtonum.h ) target_include_directories( - ndt_objects PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} - ${CURL_INCLUDE_DIRS} -) - -add_library(ndt $) -target_include_directories( - # Duplicate includes of `ndt_objects` because when building binaries we do - # not use `ndt_objects`, so includes are not transitively picked up. - # TODO(bassosimone): we can perhaps do this using a generator expression - # but so far I have failed to do this properly. ndt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CURL_INCLUDE_DIRS} ) @@ -135,13 +124,13 @@ install( FILES libndt.hpp DESTINATION - include/measurement_kit/libndt + include ) install( TARGETS ndt DESTINATION - lib/measurement_kit/ + lib ) install( TARGETS diff --git a/README.md b/README.md index ddc02c8..d60d8ea 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,17 @@ -# Measurement Kit NDT engine +# NDT Client Engine [![GitHub license](https://img.shields.io/github/license/measurement-kit/libndt.svg)](https://raw.githubusercontent.com/measurement-kit/libndt/master/LICENSE) [![Github Releases](https://img.shields.io/github/release/measurement-kit/libndt.svg)](https://github.com/measurement-kit/libndt/releases) [![Build Status](https://img.shields.io/travis/measurement-kit/libndt/master.svg)](https://travis-ci.org/measurement-kit/libndt) [![Coverage Status](https://img.shields.io/coveralls/measurement-kit/libndt/master.svg)](https://coveralls.io/github/measurement-kit/libndt?branch=master) [![Build status](https://img.shields.io/appveyor/ci/bassosimone/libndt/master.svg)](https://ci.appveyor.com/project/bassosimone/libndt/branch/master) [![Documentation](https://codedocs.xyz/measurement-kit/libndt.svg)](https://codedocs.xyz/measurement-kit/libndt/) -This repository compiles a NDT engine that is meant to be integrated into -the build of Measurement Kit. +`libndt` is a Network-Diagnostic-Tool (NDT) C++11 client engine. ## Synopsis This example runs a NDT download-only nettest with a nearby server: ```C++ -#include +#include int main() { - using namespace measurement_kit; libndt::Client client; client.run(); } diff --git a/curlx.cpp b/curlx.cpp index e11f124..f9f9cd8 100644 --- a/curlx.cpp +++ b/curlx.cpp @@ -31,7 +31,6 @@ static size_t curl_callback(char *ptr, size_t size, size_t nmemb, } // extern "C" -namespace measurement_kit { namespace libndt { #define EMIT_WARNING(client, statements) \ @@ -175,5 +174,4 @@ Curl::~Curl() noexcept {} CURL *Curl::easy_init() noexcept { return ::curl_easy_init(); } } // namespace libndt -} // namespace measurement_kit #endif // HAVE_CURL diff --git a/curlx.hpp b/curlx.hpp index 373d6d2..d45d8bf 100644 --- a/curlx.hpp +++ b/curlx.hpp @@ -14,7 +14,6 @@ #include "libndt.hpp" -namespace measurement_kit { namespace libndt { class CurlDeleter { @@ -64,6 +63,5 @@ class Curl { }; } // namespace libndt -} // namespace measurement_kit #endif // HAVE_CURL #endif // MEASUREMENT_KIT_LIBNDT_CURLX_HPP diff --git a/curlx_test.cpp b/curlx_test.cpp index 5f2b40c..c157f15 100644 --- a/curlx_test.cpp +++ b/curlx_test.cpp @@ -7,8 +7,6 @@ #include "catch.hpp" -using namespace measurement_kit; - // Curl::method_get_maybe_socks5() tests // ------------------------------------- diff --git a/libndt-client.cpp b/libndt-client.cpp index 9972160..b919ec4 100644 --- a/libndt-client.cpp +++ b/libndt-client.cpp @@ -30,7 +30,6 @@ static void usage() { } int main(int, char **argv) { - using namespace measurement_kit; libndt::Settings settings; settings.verbosity = libndt::verbosity_quiet; settings.nettest_flags = 0; // you need to enable tests explicitly diff --git a/libndt.cpp b/libndt.cpp index 620769e..109c7b6 100644 --- a/libndt.cpp +++ b/libndt.cpp @@ -36,7 +36,6 @@ #include "json.hpp" #include "strtonum.h" -namespace measurement_kit { namespace libndt { // Private constants @@ -1654,4 +1653,3 @@ int Client::getsockopt(int socket, int level, int name, void *value, } } // namespace libndt -} // namespace measurement_kit diff --git a/libndt.hpp b/libndt.hpp index d67390e..5f4b6bc 100644 --- a/libndt.hpp +++ b/libndt.hpp @@ -43,9 +43,6 @@ #include #include -/// Contains measurement-kit code. -namespace measurement_kit { - /// Contains measurement-kit/libndt code. namespace libndt { @@ -406,5 +403,4 @@ enum class Err { }; } // namespace libndt -} // namespace measurement_kit #endif diff --git a/libndt_test.cpp b/libndt_test.cpp index 414737b..edb4b44 100644 --- a/libndt_test.cpp +++ b/libndt_test.cpp @@ -38,8 +38,6 @@ // Speaking of coverage, if specific code is already tested by running the // example client, we don't need to write also a test for it here. -using namespace measurement_kit; - // Client::run() tests // -------------------