Skip to content

Commit 91b5bd4

Browse files
committed
Cleaned up build scripts.
1 parent f848dab commit 91b5bd4

File tree

7 files changed

+7
-57
lines changed

7 files changed

+7
-57
lines changed

boost/network/uri/uri.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -400,18 +400,4 @@ inline uri from_parts(const uri::string_type &base_uri,
400400
} // namespace network
401401
} // namespace boost
402402

403-
#include <boost/filesystem/path.hpp>
404-
405-
namespace boost {
406-
namespace network {
407-
namespace uri {
408-
inline uri from_file(const filesystem::path &path_) {
409-
uri uri_;
410-
builder(uri_).scheme("file").path(path_.string());
411-
return uri_;
412-
}
413-
} // namespace uri
414-
} // namespace network
415-
} // namespace boost
416-
417403
#endif // BOOST_NETWORK_URI_INC__

libs/network/example/CMakeLists.txt

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,42 @@ add_dependencies(simple_wget cppnetlib-uri cppnetlib-client-connections)
2525
add_dependencies(atom_reader cppnetlib-uri cppnetlib-client-connections)
2626
add_dependencies(rss_reader cppnetlib-uri cppnetlib-client-connections)
2727
add_dependencies(trivial_google cppnetlib-uri cppnetlib-client-connections)
28-
set(BOOST_CLIENT_LIBS
29-
${Boost_PROGRAM_OPTIONS_LIBRARY}
30-
${Boost_THREAD_LIBRARY}
31-
${Boost_DATE_TIME_LIBRARY}
32-
${Boost_REGEX_LIBRARY}
33-
${Boost_SYSTEM_LIBRARY}
34-
${Boost_FILESYSTEM_LIBRARY}
35-
${Boost_CHRONO_LIBRARY})
36-
37-
set(BOOST_SERVER_LIBS
38-
${Boost_THREAD_LIBRARY}
39-
${Boost_SYSTEM_LIBRARY}
40-
${Boost_DATE_TIME_LIBRARY}
41-
${Boost_REGEX_LIBRARY}
42-
${Boost_PROGRAM_OPTIONS_LIBRARY}
43-
${Boost_FILESYSTEM_LIBRARY}
44-
${Boost_CHRONO_LIBRARY})
4528

4629
target_link_libraries(http_client
47-
${BOOST_CLIENT_LIBS}
4830
${CMAKE_THREAD_LIBS_INIT}
4931
cppnetlib-uri
5032
cppnetlib-client-connections)
5133

5234
target_link_libraries(simple_wget
53-
${BOOST_CLIENT_LIBS}
5435
${CMAKE_THREAD_LIBS_INIT}
5536
cppnetlib-uri
5637
cppnetlib-client-connections)
5738

5839
target_link_libraries(atom_reader
59-
${BOOST_CLIENT_LIBS}
6040
${CMAKE_THREAD_LIBS_INIT}
6141
cppnetlib-uri
6242
cppnetlib-client-connections)
6343

6444
target_link_libraries(rss_reader
65-
${BOOST_CLIENT_LIBS}
6645
${CMAKE_THREAD_LIBS_INIT}
6746
cppnetlib-uri
6847
cppnetlib-client-connections)
6948

7049
target_link_libraries(trivial_google
71-
${BOOST_CLIENT_LIBS}
7250
${CMAKE_THREAD_LIBS_INIT}
7351
cppnetlib-uri
7452
cppnetlib-client-connections)
7553

7654
target_link_libraries(hello_world_server
77-
${BOOST_SERVER_LIBS}
7855
${CMAKE_THREAD_LIBS_INIT}
7956
cppnetlib-server-parsers)
8057

8158
target_link_libraries(hello_world_client
82-
${BOOST_CLIENT_LIBS}
8359
${CMAKE_THREAD_LIBS_INIT}
8460
cppnetlib-uri
8561
cppnetlib-client-connections)
8662

8763
target_link_libraries(hello_world_async_server_with_work_queue
88-
${BOOST_CLIENT_LIBS}
8964
${CMAKE_THREAD_LIBS_INIT}
9065
cppnetlib-uri
9166
cppnetlib-client-connections
@@ -126,8 +101,6 @@ endif()
126101

127102
if (UNIX)
128103
target_link_libraries(fileserver
129-
${BOOST_SERVER_LIBS}
130-
${Boost_FILESYSTEM_LIBRARY}
131104
${CMAKE_THREAD_LIBS_INIT}
132105
cppnetlib-server-parsers)
133106
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

libs/network/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if (OPENSSL_FOUND)
4545
target_link_libraries(cppnetlib-client-connections ${OPENSSL_LIBRARIES})
4646
endif ()
4747
if (Boost_FOUND)
48-
target_link_libraries(cppnetlib-client-connections ${Boost_LIBRARIES})
48+
target_link_libraries(cppnetlib-client-connections)
4949
endif ()
5050
install(TARGETS cppnetlib-client-connections
5151
EXPORT cppnetlibTargets

libs/network/test/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ if (Boost_FOUND)
2020
endif()
2121
add_executable(cpp-netlib-${test} ${test}.cpp)
2222
add_dependencies(cpp-netlib-${test} cppnetlib-uri gtest_main)
23-
target_link_libraries(cpp-netlib-${test}
24-
${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY}
25-
${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri gtest_main)
23+
target_link_libraries(cpp-netlib-${test} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri gtest_main)
2624
if (OPENSSL_FOUND)
2725
target_link_libraries(cpp-netlib-${test} ${OPENSSL_LIBRARIES})
2826
endif()
@@ -41,4 +39,3 @@ if (Boost_FOUND)
4139
# Also copy the server directory to the root of the build directory.
4240
file(COPY server DESTINATION ${CPP-NETLIB_BINARY_DIR}/libs/network/test/)
4341
endif()
44-

libs/network/test/http/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (Boost_FOUND)
1919
add_dependencies(cpp-netlib-http-${test} gtest_main
2020
cppnetlib-uri)
2121
target_link_libraries(cpp-netlib-http-${test}
22-
${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} gtest_main
22+
${CMAKE_THREAD_LIBS_INIT} gtest_main
2323
cppnetlib-uri)
2424
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU AND ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
2525
target_link_libraries(cpp-netlib-http-${test} ws2_32)
@@ -42,7 +42,7 @@ if (Boost_FOUND)
4242
add_executable(cpp-netlib-http-${test} ${test}.cpp)
4343
add_dependencies(cpp-netlib-http-${test} cppnetlib-uri
4444
cppnetlib-client-connections gtest_main)
45-
target_link_libraries(cpp-netlib-http-${test} ${Boost_LIBRARIES}
45+
target_link_libraries(cpp-netlib-http-${test}
4646
${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri gtest_main cppnetlib-client-connections)
4747
if (OPENSSL_FOUND)
4848
target_link_libraries(cpp-netlib-http-${test} ${OPENSSL_LIBRARIES})
@@ -64,7 +64,7 @@ if (Boost_FOUND)
6464
foreach (test ${SERVER_API_TESTS})
6565
add_executable(cpp-netlib-http-${test} ${test}.cpp)
6666
add_dependencies(cpp-netlib-http-${test} cppnetlib-server-parsers)
67-
target_link_libraries(cpp-netlib-http-${test} ${Boost_LIBRARIES}
67+
target_link_libraries(cpp-netlib-http-${test}
6868
${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers gtest_main)
6969
if (OPENSSL_FOUND)
7070
target_link_libraries(cpp-netlib-http-${test} ${OPENSSL_LIBRARIES})
@@ -87,7 +87,7 @@ if (Boost_FOUND)
8787
add_dependencies(cpp-netlib-http-server_async_run_stop_concurrency
8888
cppnetlib-server-parsers)
8989
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency
90-
${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers)
90+
${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers)
9191
if (OPENSSL_FOUND)
9292
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency
9393
${OPENSSL_LIBRARIES})

libs/network/test/uri/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (Boost_FOUND)
1717
add_executable(cpp-netlib-${test} ${test}.cpp)
1818
add_dependencies(cpp-netlib-${test} cppnetlib-uri gtest_main)
1919
target_link_libraries(cpp-netlib-${test}
20-
${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri
20+
${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri
2121
gtest_main)
2222
if (OPENSSL_FOUND)
2323
target_link_libraries(cpp-netlib-${test} ${OPENSSL_LIBRARIES})

libs/network/test/uri/uri_test.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,6 @@ TEST(URITest, from_parts_4) {
508508
uri::from_parts("http://www.example.com", "/path"));
509509
}
510510

511-
TEST(URITest, from_file) {
512-
boost::filesystem::path path("/a/path/to/a/file.txt");
513-
EXPECT_EQ(uri::uri("file:///a/path/to/a/file.txt"),
514-
uri::from_file(path));
515-
}
516-
517511
TEST(URITest, issue_104_test) {
518512
// https://github.com/cpp-netlib/cpp-netlib/issues/104
519513
std::unique_ptr<uri::uri> instance(new uri::uri("http://www.example.com/"));

0 commit comments

Comments
 (0)