Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Rename example_client libndt-client (#28)
Browse files Browse the repository at this point in the history
* Rename example_client libndt-client

Also, install it.

Closes #23.

* [ci skip] libndt-client: fix usage string
  • Loading branch information
bassosimone authored Jun 9, 2018
1 parent f5ea4ef commit b8540dd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
/build.ninja
/catch.hpp
/cmake_install.cmake
/example_client
/html
/json.hpp
/latex
/libndt-client
/libndt.a
/rules.ninja
/tests
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ target_include_directories(
${CURL_INCLUDE_DIRS}
)
target_link_libraries(ndt ${CURL_LIBRARIES})
add_executable(libndt-client libndt-client.cpp)
target_link_libraries(libndt-client ndt)
install(
FILES
libndt.hpp
Expand All @@ -141,6 +143,12 @@ install(
DESTINATION
lib/measurement_kit/
)
install(
TARGETS
libndt-client
DESTINATION
bin
)
if("${WIN32}" OR "${MINGW}")
target_link_libraries(ndt ws2_32 "${_EXTRA_LIBS}")
if ("${MINGW}")
Expand All @@ -159,8 +167,6 @@ set(BUILD_TESTING "ON" CACHE BOOL "Whether to build tests")

if(${BUILD_TESTING} AND ${LIBNDT_ENABLE_TESTS})
enable_testing()
add_executable(example_client example_client.cpp)
target_link_libraries(example_client ndt)
add_executable(
tests
curlx_test.cpp
Expand All @@ -176,11 +182,11 @@ if(${BUILD_TESTING} AND ${LIBNDT_ENABLE_TESTS})
if(${CURL_FOUND}) # Some tests require cURL for mlab-ns
add_test(
NAME simple_download_test
COMMAND example_client --verbose --download
COMMAND libndt-client --verbose --download
)
add_test(
NAME simple_upload_test
COMMAND example_client --verbose --json --upload
COMMAND libndt-client --verbose --json --upload
)
endif()
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main() {

See [codedocs.xyz/measurement-kit/libndt](
https://codedocs.xyz/measurement-kit/libndt/) for API documentation. See
[example_client.cpp](example_client.cpp) for a usage example. See
[libndt-client.cpp](libndt-client.cpp) for a usage example. See
[libndt.hpp](libndt.hpp) for the full API.

## Clone
Expand Down
2 changes: 1 addition & 1 deletion example_client.cpp → libndt-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

static void usage() {
std::clog << "\n";
std::clog << "Usage: client [options] [<hostname>]\n";
std::clog << "Usage: libndt-client [options] [<hostname>]\n";
std::clog << "\n";
std::clog << " --download : run download test\n";
std::clog << " --download-ext : run multi-stream download test\n";
Expand Down

0 comments on commit b8540dd

Please sign in to comment.