Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverting tox_loop PR changes #538

Merged
merged 3 commits into from
Apr 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ addons:
packages:
- check
- libcv-dev # For av_test.
- libev-dev # For tox_loop.
- libevent-dev # For tox_loop.
- libhighgui-dev # For av_test.
- libopencv-contrib-dev # For av_test.
- libsndfile1-dev # For av_test.
Expand Down
19 changes: 0 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ if (BUILD_TOXAV)
endif()
endif()

if(LIBEV_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_LIBEV")
elseif(LIBEVENT_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_LIBEVENT")
endif()

################################################################################
#
# :: Tox Core Library
Expand Down Expand Up @@ -240,18 +234,6 @@ if(RT_LIBRARIES)
set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lrt")
endif()

if(LIBEV_FOUND)
target_link_modules(toxnetwork ${LIBEV_LIBRARIES})
set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lev")
elseif(LIBEVENT_FOUND)
target_link_modules(toxnetwork ${LIBEVENT_LIBRARIES})
if(NOT WIN32)
set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-levent -levent_pthreads")
else()
set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-levent")
endif()
endif()

if(WIN32)
target_link_modules(toxnetwork ws2_32 iphlpapi)
set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lws2_32 -liphlpapi")
Expand Down Expand Up @@ -443,7 +425,6 @@ auto_test(resource_leak)
auto_test(save_friend)
auto_test(skeleton)
auto_test(tox)
auto_test(tox_loop)
auto_test(tox_many)
auto_test(tox_many_tcp)
auto_test(tox_one)
Expand Down
11 changes: 2 additions & 9 deletions auto_tests/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if BUILD_TESTS

TESTS = encryptsave_test messenger_autotest crypto_test network_test onion_test TCP_test tox_loop_test tox_test dht_autotest tox_strncasecmp_test
check_PROGRAMS = encryptsave_test messenger_autotest crypto_test network_test onion_test TCP_test tox_loop_test tox_test dht_autotest tox_strncasecmp_test
TESTS = encryptsave_test messenger_autotest crypto_test network_test onion_test TCP_test tox_test dht_autotest tox_strncasecmp_test
check_PROGRAMS = encryptsave_test messenger_autotest crypto_test network_test onion_test TCP_test tox_test dht_autotest tox_strncasecmp_test

AUTOTEST_CFLAGS = \
$(LIBSODIUM_CFLAGS) \
Expand Down Expand Up @@ -61,13 +61,6 @@ TCP_test_CFLAGS = $(AUTOTEST_CFLAGS)
TCP_test_LDADD = $(AUTOTEST_LDADD)


tox_loop_test_SOURCES = ../auto_tests/tox_loop_test.c

tox_loop_test_CFLAGS = $(AUTOTEST_CFLAGS)

tox_loop_test_LDADD = $(AUTOTEST_LDADD)


tox_test_SOURCES = ../auto_tests/tox_test.c

tox_test_CFLAGS = $(AUTOTEST_CFLAGS)
Expand Down
132 changes: 0 additions & 132 deletions auto_tests/tox_loop_test.c

This file was deleted.

1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies:
- sudo apt-get install clang
- sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm
- sudo apt-get install libopus-dev libvpx-dev pkg-config
- sudo apt-get install libev-dev libevent-dev

# ------------ network_test requires that "localhost" resolves to ::1 ------------
- sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry
Expand Down
32 changes: 12 additions & 20 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,30 @@ include(ModulePackage)

find_package(Threads REQUIRED)

find_library(NCURSES_LIBRARIES ncurses )
find_library(UTIL_LIBRARIES util )
find_library(RT_LIBRARIES rt )
find_library(NCURSES_LIBRARIES ncurses )
find_library(UTIL_LIBRARIES util )
find_library(RT_LIBRARIES rt )

# For toxcore.
pkg_use_module(LIBSODIUM libsodium )
pkg_use_module(LIBEV ev )
if(NOT LIBEV_FOUND)
if(NOT WIN32)
pkg_use_module(LIBEVENT libevent_pthreads )
else()
pkg_use_module(LIBEVENT libevent )
endif()
endif()
pkg_use_module(LIBSODIUM libsodium )

# For toxav.
pkg_use_module(OPUS opus )
pkg_use_module(VPX vpx )
pkg_use_module(OPUS opus )
pkg_use_module(VPX vpx )

# For tox-bootstrapd.
pkg_use_module(LIBCONFIG libconfig )
pkg_use_module(LIBCONFIG libconfig )

# For auto tests.
pkg_use_module(CHECK check )
pkg_use_module(CHECK check )

# For tox-spectest.
pkg_use_module(MSGPACK msgpack )
pkg_use_module(MSGPACK msgpack )

# For av_test.
pkg_use_module(OPENCV opencv )
pkg_use_module(PORTAUDIO portaudio-2.0 )
pkg_use_module(SNDFILE sndfile )
pkg_use_module(OPENCV opencv )
pkg_use_module(PORTAUDIO portaudio-2.0)
pkg_use_module(SNDFILE sndfile )

###############################################################################
#
Expand Down
27 changes: 0 additions & 27 deletions cmake/ModulePackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ option(ENABLE_SHARED "Build shared (dynamic) libraries for all modules" ON)
option(ENABLE_STATIC "Build static libraries for all modules" ON)
option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF)

include(FindPackageHandleStandardArgs)

if(NOT ENABLE_SHARED AND NOT ENABLE_STATIC)
message(WARNING
"Both static and shared libraries are disabled; "
Expand Down Expand Up @@ -50,31 +48,6 @@ function(pkg_use_module mod pkg)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE)
endforeach()
else()
set(${mod}_DEFINITIONS ${${mod}_CFLAGS_OTHER})
find_path(${mod}_INCLUDE_DIR NAMES ${ARGV1}.h
HINTS ${${mod}_INCLUDEDIR} ${${mod}_INCLUDE_DIRS}
PATH_SUFFIXES ${ARGV1})
find_library(${mod}_LIBRARY NAMES ${ARGV1} lib${ARGV1}
HINTS ${${mod}_LIBDIR} ${${mod}_LIBRARY_DIRS})
find_package_handle_standard_args(${mod} DEFAULT_MSG
${mod}_LIBRARY ${mod}_INCLUDE_DIR)

if(${mod}_FOUND)
mark_as_advanced(${mod}_INCLUDE_DIR ${mod}_LIBRARY)
set(${mod}_LIBRARIES ${${mod}_LIBRARY} PARENT_SCOPE)
set(${mod}_INCLUDE_DIRS ${${mod}_INCLUDE_DIR} PARENT_SCOPE)
set(${mod}_FOUND TRUE PARENT_SCOPE)
link_directories(${${mod}_LIBRARY_DIRS})
include_directories(${${mod}_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE)

foreach(dir ${${mod}_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE)
endforeach()
endif()
endif()
endfunction()

Expand Down
Loading