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

Commit b8540dd

Browse files
authored
Rename example_client libndt-client (#28)
* Rename example_client libndt-client Also, install it. Closes #23. * [ci skip] libndt-client: fix usage string
1 parent f5ea4ef commit b8540dd

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
/build.ninja
1111
/catch.hpp
1212
/cmake_install.cmake
13-
/example_client
1413
/html
1514
/json.hpp
1615
/latex
16+
/libndt-client
1717
/libndt.a
1818
/rules.ninja
1919
/tests

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ target_include_directories(
129129
${CURL_INCLUDE_DIRS}
130130
)
131131
target_link_libraries(ndt ${CURL_LIBRARIES})
132+
add_executable(libndt-client libndt-client.cpp)
133+
target_link_libraries(libndt-client ndt)
132134
install(
133135
FILES
134136
libndt.hpp
@@ -141,6 +143,12 @@ install(
141143
DESTINATION
142144
lib/measurement_kit/
143145
)
146+
install(
147+
TARGETS
148+
libndt-client
149+
DESTINATION
150+
bin
151+
)
144152
if("${WIN32}" OR "${MINGW}")
145153
target_link_libraries(ndt ws2_32 "${_EXTRA_LIBS}")
146154
if ("${MINGW}")
@@ -159,8 +167,6 @@ set(BUILD_TESTING "ON" CACHE BOOL "Whether to build tests")
159167

160168
if(${BUILD_TESTING} AND ${LIBNDT_ENABLE_TESTS})
161169
enable_testing()
162-
add_executable(example_client example_client.cpp)
163-
target_link_libraries(example_client ndt)
164170
add_executable(
165171
tests
166172
curlx_test.cpp
@@ -176,11 +182,11 @@ if(${BUILD_TESTING} AND ${LIBNDT_ENABLE_TESTS})
176182
if(${CURL_FOUND}) # Some tests require cURL for mlab-ns
177183
add_test(
178184
NAME simple_download_test
179-
COMMAND example_client --verbose --download
185+
COMMAND libndt-client --verbose --download
180186
)
181187
add_test(
182188
NAME simple_upload_test
183-
COMMAND example_client --verbose --json --upload
189+
COMMAND libndt-client --verbose --json --upload
184190
)
185191
endif()
186192
endif()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main() {
2121

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

2727
## Clone

example_client.cpp renamed to libndt-client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
static void usage() {
1616
std::clog << "\n";
17-
std::clog << "Usage: client [options] [<hostname>]\n";
17+
std::clog << "Usage: libndt-client [options] [<hostname>]\n";
1818
std::clog << "\n";
1919
std::clog << " --download : run download test\n";
2020
std::clog << " --download-ext : run multi-stream download test\n";

0 commit comments

Comments
 (0)