summaryrefslogtreecommitdiffstats
path: root/tests/Network/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-17 23:33:59 +0100
committerMattes D <github@xoft.cz>2015-01-22 20:13:00 +0100
commitd3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899 (patch)
tree646bd5529f803e448b6eec6c9bac3be8d8f68a94 /tests/Network/CMakeLists.txt
parentcNetwork: Fixed WSAStartup()-not-called error in Listen(). (diff)
downloadcuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.tar
cuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.tar.gz
cuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.tar.bz2
cuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.tar.lz
cuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.tar.xz
cuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.tar.zst
cuberite-d3076a3e1664c6a6e7c0d4cf24ac4335bb0a3899.zip
Diffstat (limited to 'tests/Network/CMakeLists.txt')
-rw-r--r--tests/Network/CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/Network/CMakeLists.txt b/tests/Network/CMakeLists.txt
index 9d0dcdc24..6bf291544 100644
--- a/tests/Network/CMakeLists.txt
+++ b/tests/Network/CMakeLists.txt
@@ -6,10 +6,13 @@ include_directories(${CMAKE_SOURCE_DIR}/src/)
include_directories(${CMAKE_SOURCE_DIR}/lib/libevent/include)
add_definitions(-DTEST_GLOBALS=1)
+
+# Create a single Network library that contains all the networking code:
add_library(Network
- ${CMAKE_SOURCE_DIR}/src/OSSupport/Network.cpp
${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.cpp
${CMAKE_SOURCE_DIR}/src/OSSupport/Event.cpp
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/Network.cpp
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/NetworkSingleton.cpp
${CMAKE_SOURCE_DIR}/src/StringUtils.cpp
)
@@ -18,12 +21,20 @@ if (MSVC)
target_link_libraries(Network ws2_32.lib)
endif()
+
+
+
+# Define individual tests:
+
+# Google: download the google.com frontpage using http client socket:
add_executable(Google-exe Google.cpp)
target_link_libraries(Google-exe Network)
add_test(NAME Google-test COMMAND Google-exe)
+# EchoServer: Listen on port 9876, echo everything back:
add_executable(EchoServer EchoServer.cpp)
target_link_libraries(EchoServer Network)
+# NameLookup: Lookup hostname-to-IP and IP-to-hostname:
add_executable(NameLookup NameLookup.cpp)
target_link_libraries(NameLookup Network)