38 Commits

Author SHA1 Message Date
Joakim Soderberg
5c7282f7a5 Fix compilation for older OpenSSL versions.
For instance OpenSSL 0.9.7 does not have SSL_set_tlsext_host_name.

Also add the missing EVENT__DISABLE_SAMPLES CMake option.
2014-09-24 13:46:09 +02:00
Sergey Nikulov
27bd9faf49 updates in cmake build 2014-09-02 18:25:52 +04:00
Trond Norbye
15d90cce39 Add missing headerfile for cmake 2014-03-24 15:01:59 +01:00
Nick Mathewson
de268feb67 Increment version to 2.1.4-alpha-dev 2014-03-21 13:20:34 -04:00
Trond Norbye
73474042fe Fixup make install for cmake projects
Install all of the public headers and put the dll's in the
same directory as the binaries.
2014-03-21 14:27:21 +01:00
Nick Mathewson
d08273eca8 Increment version to 2.1.4-alpha 2014-03-16 12:09:24 -04:00
Nick Mathewson
8896a92b07 Merge remote-tracking branch 'origin/pr/110' 2014-03-03 13:47:21 -05:00
Trond Norbye
4545fa9b68 Add option to build shared library 2014-02-25 14:57:24 +01:00
Nick Mathewson
f665d5cb27 Stop checking for inet_aton; we don't use it.
We had cmake and autoconf tests for the inet_aton function... but we
never actually use it any more.

(The autoconf tests still use the callability of inet_aton to decide
whether we need to link against -lresolv)

Reported by Harlan Stenn.
2014-02-24 10:33:16 -05:00
Trond Norbye
a0dd5df20a Rename event_extras to event_extra
The library event_extras is named event_extra when building with
GNU autotools
2014-02-19 06:38:00 +01:00
Trond Norbye
ed99d92c01 Added -Qunused-arguments for clang on macosx
The CLang provided through Xcode on Mac OSX emits warnings for
all unused include paths making the compilation extremely verbose.
2014-02-14 09:15:27 +01:00
Joakim Soderberg
f1715b471d Guard against EVENT_NOWIN32 being set during testing.
On windows all tests will fail if EVENT_NOWIN32 is set, since then there
will be no backend available.

Question is if we should simply disable the environment variable check on
Windows, since there's only one backend available anyway?
2014-01-22 12:12:51 +01:00
Joakim Söderberg
d38d798b25 CMake: Get rid of python not found warning when regress tests turned off.
It would warn that python wasn't found when it was, just because the regress tests where turned off... confusing.
2014-01-22 00:06:21 +01:00
Joakim Söderberg
e423d42018 Fix CMake compile when OpenSSL is disabled. 2014-01-22 00:03:37 +01:00
Nick Mathewson
43ffcf6977 Split epoll lookup table into a separate header file
It accounted for more than half the length of epoll.c, and it's
machine-generated, so we might as well keep it separate.
2014-01-21 16:15:21 -05:00
Joakim Söderberg
20244671cd Fix include bug.
On systems where a previous version of Libevent is installed we don't want the system version of the headers to be included before the ones in the build tree. This happened on my OSX system where I had an ancient version of Libevent installed. It would then load the incorrect event-config.h and fail because the system introspection macros weren't set properly.
2014-01-21 11:19:02 +01:00
Joakim Soderberg
fd42e70d18 Set USE_DEBUG=1 on EVENT__ENABLE_VERBOSE_DEBUG 2014-01-14 17:37:58 +01:00
Joakim Soderberg
49ab363271 Some work on making it possible to simply do add_subdirectory() on the project. 2014-01-14 13:01:31 +00:00
Joakim Soderberg
4b754df949 Fix typo 2014-01-10 17:58:42 +01:00
Joakim Soderberg
f3446ed5fb Add CMake config and install targets.
Make it easier for other projects to do find_package by creating config
files both in the build and install tree.
2014-01-09 13:45:52 +01:00
Joakim Soderberg
dd413bd19b Added EVENT__ENABLE_GCC_WARNINGS, turns all warnings into errors. 2013-12-19 12:03:49 +00:00
Joakim Soderberg
f7805939d1 Only look for ZLib when it is used (if tests are included).
Also make the project language C.
2013-12-19 10:46:04 +00:00
Joakim Soderberg
4ac086abc4 Fix the "make verify" target on NetBSD 2013-12-19 10:54:52 +01:00
Joakim Soderberg
f2483f8b3d Add a "make verify_coverage" target generation coverage info.
Use lcov/gcov to gather coverage info for the tests (Only works with gcc/clang and make).

cmake -DEVENT__COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug ..
make
make verify_coverage

Current coverage (run on debian):
Line coverage 79.1 %	10231 / 12939
Function coverage 86.1 %	933 / 1083
2013-12-17 15:17:29 +00:00
Joakim Soderberg
968e97bd4b Minimum required python version is 2.4.
Got rid of TODO... The version you specify to find_package is the minimum
version, so exactly what we want.
2013-12-17 14:31:22 +01:00
Joakim Söderberg
2799b359d3 Added a test for testing if kqueue works with pipes. 2013-12-17 14:01:21 +01:00
Joakim Söderberg
a831f2f7de Fix kqueue support. 2013-12-17 13:29:04 +01:00
Joakim Söderberg
69c3516be6 Get rid of deprecation warnings for OpenSSL on OSX 10.7+ 2013-12-17 13:28:23 +01:00
Joakim Soderberg
67e5d74983 Fix the make "verify" target on Windows.
Windows does not have the "unset" command, but this doesn't matter since
the problem that requires us to use unset doesn't happen on Windows.

Also did some minor cosmetic changes, and dependcy changes.
2013-12-16 18:10:32 +01:00
Joakim Soderberg
e053c4f029 Added a "make verify" target.
This is more than for cosmetic purposes to match how it's done with autoconf.

Due to the fact that we use environment variables to turn off certain backends during the tests, simply running "ctest" or "make test" can result in failed tests.

This is because if you do "EVENT_NOEPOLL=yes && export EVENT_NOEPOLL" and then run the tests, when running the epoll tests, the EPOLL backend will be turned off. There is no way of unsetting an environment variable for a test in CMake, you can only set them. And since libevent simply checks if the environment variable is set (it doesn't check the actual value of it), this won't work.

So to remedy this, we create the "make verify" target that first unsets all the EVENT_NO* environment variables, and then runs ctest.

Also bumped the required CMake version from 2.6 to 2.8, since the set_test_properties(bla PROPERTIES ENVIRONMENT "SOME_VAR") requires 2.8

Added some explicit dependencies for the test programs to libevent, so they don't just fail if you try to run the tests without first doing "make"
2013-12-16 16:44:13 +00:00
Joakim Soderberg
7ea4159d29 Only test the event backends available on the system.
Fix how the CMake project adds the tests using the different backends. At
first we tried to do it exactly as it's done in test/test.sh.

However, test.sh uses a special program test-init to decide if a given
backend is available or not before running the actual tests. Doing it this way
will not be possible using CMake. Since then we would have to have the
test-init executable compiled at the time we run CMake, to know what tests
we should add. (And since CMake generates the make/project files that
compiles the executables, there's a catch 22).

Instead of deciding what tests to run this way, we simply use the result
of the CMake system introspection (that figures out what backends are
available) to decide what backend tests to add.
2013-12-16 16:37:51 +01:00
Joakim Soderberg
9bbce0b63c Only include WIN32 getopt where it is used.
getopt is only used in the benchmark tests, don't include it in the core
lib...
2013-12-16 11:34:14 +01:00
Joakim Soderberg
19222e5247 Added some GCC specific options.
- Added sample applications.
- Fixed the https-client to work on Windows kind of (No cert validation).
2013-12-13 16:27:10 +00:00
Joakim Soderberg
58fcd42880 Link libm on unix platforms. 2013-12-13 12:39:50 +00:00
Joakim Soderberg
ce14defeb6 Generate a dummy evconfig-private.h so things build properly.
Windows used to have an empty file for this before.
2013-12-13 13:33:43 +01:00
Joakim Soderberg
99c1dc3233 More work on adding tests to CMake project 2013-12-12 18:21:11 +01:00
Joakim Soderberg
e9fc014c86 Add all tests and benchmarks to CMake project.
Also fixed some minor issues with what's built.
2013-12-12 16:33:20 +01:00
Joakim Soderberg
e415196a7d Initial CMake commit. 2013-12-09 18:05:32 +01:00