History log of /libevent-2.1.12/CMakeLists.txt (Results 1 – 25 of 137)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release-2.2.1-alpha, release-2.1.12-stable
# 2cfa7ff7 28-Jun-2020 Azat Khuzhin <[email protected]>

Bump version to 2.1.12-stable (w/o ABI breakage)


# a62ec765 18-Jun-2020 Paul Osborne <[email protected]>

cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT

In some CMake integrations, portions of the toolchain may end up
defining CMAKE_USE_PTHREADS_INIT even when EVENT__DISABLE_THREAD_SUPPORT
is

cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT

In some CMake integrations, portions of the toolchain may end up
defining CMAKE_USE_PTHREADS_INIT even when EVENT__DISABLE_THREAD_SUPPORT
is set for libevent. Modify the build to not rely on this side effect
of find_package(Threads, ...) [which could be done elsewhere] but instead
to use EVENT__HAVE_PTHREADS which is defined only on the desired codepath.

Without this change, affected builds fail as a result of event_pthreads source
files being built but with build defines which cause the build to fail.

Signed-off-by: Paul Osborne <[email protected]>
(cherry picked from commit 26d5ff457c9e6cf9b84ec9d8fb83d87caf083d96)

show more ...


# 9ea60ab2 05-May-2020 Azat Khuzhin <[email protected]>

Pass --quiet to the event_rcpgen.py (autotools already does this)

(cherry picked from commit 7a465268b29c57958e55dceda77ad8322e247454)


# 9ed49f2d 07-Apr-2020 Azat Khuzhin <[email protected]>

cmake: missing test-closed binary

(cherry picked from commit 57862901095a97306e74b2944d5808051f813ed5)


# 13af9d26 20-Mar-2020 yuangongji <[email protected]>

cmake: replace CheckFunctionExists with CheckSymbolExists

Checking functions with `CheckFunctionExists` may
get wrong results, we should replace it with
`CheckSymbolExists`, which is recommended by

cmake: replace CheckFunctionExists with CheckSymbolExists

Checking functions with `CheckFunctionExists` may
get wrong results, we should replace it with
`CheckSymbolExists`, which is recommended by the cmake
official documentation.
Before using `CheckSymbolExists`, we use
`CheckIncludeFiles` to check header files and save the
available header files in a variable that guarantees
`CheckSymbolExists` and `CheckTypeSize` to work correctly.
This approach is modeled after the cmake scripts of `curl`.

The following functions or files were not found before
modification, they can now be found:
- msys2 + mingw-8.1.0 on Windows10 or mingw-7.3.0 on Ubuntu-18.04
timerclear
timercmp
timerisset

- windows10
getaddrinfo
getnameinfo
getprotobynumber
getservbyname
putenv
strtoll
timerclear
timercmp
timerisset

- ubuntu-18.04
sys/sysctl.h
timeradd
timerclear
timercmp
timerisset

- MacOS 10.13
sys/random.h
timeradd
timerclear
timercmp
timerisset

(cherry picked from commit 41d1d75a84e03219ec037b0f7982a67fb031eae7)

show more ...


# dea51c2e 16-Mar-2020 yuangongji <[email protected]>

cmake: fix getaddrinfo checking error

Using `CheckFunctionExists` on Windows to check `getaddrinfo`
will get `not found`, but it actually exists. Using `CheckSymbolExists`
with headers will get corr

cmake: fix getaddrinfo checking error

Using `CheckFunctionExists` on Windows to check `getaddrinfo`
will get `not found`, but it actually exists. Using `CheckSymbolExists`
with headers will get correct results. Other functions such as
`getnameinfo`,`inet_ntop`,etc. have the same issue.

(cherry picked from commit 503ba1d36571e3cb01826d15dc462b7d8b5094de)

show more ...


# 88384865 16-Mar-2020 yuangongji <[email protected]>

cmake: remove CheckFunctionExistsEx

`CheckFunctionExistsEx` is copied from the cmake modules before
3.1.2, which is the minimum required version of libevent.
The internal module `CheckFunctionExists

cmake: remove CheckFunctionExistsEx

`CheckFunctionExistsEx` is copied from the cmake modules before
3.1.2, which is the minimum required version of libevent.
The internal module `CheckFunctionExists`of cmake can completely
replace it.

(cherry picked from commit 61c5c19bfdabd2f16407a3ed615060c9d0502e82)

show more ...


# e85afbe3 13-Jan-2020 Azat Khuzhin <[email protected]>

Merge branch 'osx-clock'

Moves the thread into real-time scheduling class, as recommended in [1], it
fixes the separate test provided by @ygj6 [2] everywhere (github actions,
travis-ci, appveyor) un

Merge branch 'osx-clock'

Moves the thread into real-time scheduling class, as recommended in [1], it
fixes the separate test provided by @ygj6 [2] everywhere (github actions,
travis-ci, appveyor) under osx.

[1]: https://developer.apple.com/library/archive/technotes/tn2169/_index.html
[2]: https://github.com/azat-archive/osx-timers/commit/dde1a6e4d04506d0e0fb193ebb9f49ae25873be6

Although even after this changes the following time-related tests failed
on travis-ci:
- no_events
- del_wait

But anyway I guess #940 can be closed, since this fixes the issue in common.

* osx-clock:
test: Use THREAD_* wrappers in del_notify/del_wait
test: move threads created with THREAD_START() to realtime scheduling class too
test: put thread into real time scheduling class on osx for better latencies

Closes: #940
(cherry picked from commit a6f81aa45455c8afb69980f7026a0e706f4f9387)

show more ...


# 677378ea 13-Jan-2020 Azat Khuzhin <[email protected]>

cmake: do not print used method (EVENT_SHOW_METHOD) while running tests

autotools don't, plus this will make CI logs cleaner

(cherry picked from commit f8a6f12712e775720b36e0c4375a5fd6870bb737)


# 70ac2144 13-Jan-2020 Azat Khuzhin <[email protected]>

cmake: run regress test quietly like autotools (makes CI logs cleaner)

(cherry picked from commit fa33819e3b0f706a0c8b6bcb6eb2c6646609542a)


# 3f1fb1f9 08-Jan-2020 Dimo Markov <[email protected]>

Added uninstall target check to cmakelists

(cherry picked from commit f0e79bafd8823aedf535e9b344d4cf9a4f9747e5)


# 2db851a9 30-Nov-2019 Azat Khuzhin <[email protected]>

cmake: set CMAKE_{RUNTIME,LIBRARY,ARCHIVE}_OUTPUT_DIRECTORY they are not defined

This will allow overriding them in parent cmake rules, i.e. if libevent
is used via add_subdirectory().

Closes: #931

cmake: set CMAKE_{RUNTIME,LIBRARY,ARCHIVE}_OUTPUT_DIRECTORY they are not defined

This will allow overriding them in parent cmake rules, i.e. if libevent
is used via add_subdirectory().

Closes: #931
(cherry picked from commit 8f13c170cf6e9a02dec410b967884ec5e08947ab)

show more ...


# 1c047618 07-Nov-2019 yuangongji <[email protected]>

cmake: improve package config file

(cherry picked from commit dc4be869d5009f38e0ef02ff07dd799f9c2fef2f)


# f602211f 29-Oct-2019 Philip Homburg <[email protected]>

Parse IPv6 scope IDs.

(cherry picked from commit 9fecb59a94ef246088d7f3e0365c2fe80d0df2f4)


# a9d1121d 25-Oct-2019 yuangongji <[email protected]>

cmake: eliminate duplicate installation of public headers

(cherry picked from commit 5fe83d7433022e29a401753f64ec78faaf25e0a7)


# 87c6f735 21-Oct-2019 Michael Davidsaver <[email protected]>

append to CMAKE_MODULE_PATH

Don't override any -DCMAKE_MODULE_PATH= passed from CLI
to eg. test custom Platform/ support.

(cherry picked from commit 84affc1837a727640f46eff2723c1364d2cd1695)


# d2871a37 15-Oct-2019 Azat Khuzhin <[email protected]>

Do not use sysctl.h on linux (it had been deprecated)

It had been deprecated for a long time (AFAIK), but since
glibc-2.29.9000-309-g744e829637 it produces a #warning

(cherry picked from commit b9b

Do not use sysctl.h on linux (it had been deprecated)

It had been deprecated for a long time (AFAIK), but since
glibc-2.29.9000-309-g744e829637 it produces a #warning

(cherry picked from commit b9b9f19058dc04b7ad4d079a38f6b86c0e7b1072)

show more ...


# 50b9be00 03-Oct-2019 William A Rowe Jr <[email protected]>

Avoid transforming base C_FLAGS set deliberately

The CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE, CMAKE_C_FLAGS_MINSIZEREL
and CMAKE_C_FLAGS_RELWITHDEBINFO options are correctly and deliberately
togg

Avoid transforming base C_FLAGS set deliberately

The CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE, CMAKE_C_FLAGS_MINSIZEREL
and CMAKE_C_FLAGS_RELWITHDEBINFO options are correctly and deliberately
toggled to use the libcmt (/MT) flag options in place of the usual
msvcrt (/MD) options, but this isn't necessarily desired by the user.
The default choice can be overriden with the EVENT__MSVC_STATIC_RUNTIME
cmake option.

However, the /MD flag that is the choice of CMake only enters into
play for the four types of builds above. If the user introduces another
CMAKE_BUILD_TYPE, the base CMAKE_C_FLAGS must not be manipulated, as
that value (and the CMAKE_C_FLAGS_{custom} value) have been explicitly
chosen by the user/developer deploying this library, and the mismatch
between these flags in different dependencies results in link errors.

The CMake build schema itself doesn't place an /MD flag in CMAKE_BUILD_TYPE
so any /M compile option in that variable needs to be retained.

Signed-off-by: William Rowe <[email protected]>
Signed-off-by: Yechiel Kalmenson <[email protected]>
(cherry picked from commit af4b07a55cc0ff0298cbd26c87b3f6a08f84c394)

show more ...


# f4a6152c 19-Sep-2019 yuangongji <[email protected]>

evutil_time: detect and use _gmtime64_s()/_gmtime64()

(cherry picked from commit 148d12ad31b03a813f4ffd9df14a85392aa74130)


# e9478640 15-Sep-2019 yuangongji <[email protected]>

https-client: load certificates from the system cert store on Windows

(cherry picked from commit 572a565130d40172e1f2b5ac83d0cdffd502105b)


# 66ec78fd 02-Sep-2019 Azat Khuzhin <[email protected]>

arc4random: replace sysctl() with getrandom (on linux)

Since sysctl() is deprecated for a long-long time, according to
sysctl(2):

Since Linux 2.6.24, uses of this system call result in warnings

arc4random: replace sysctl() with getrandom (on linux)

Since sysctl() is deprecated for a long-long time, according to
sysctl(2):

Since Linux 2.6.24, uses of this system call result in warnings in the kernel log.

Fixes: #890
Suggested-by: Pierce Lopez
(cherry picked from commit 86f55b0420f864b518475f781ce7a3c619180b12)

show more ...


# 7a85300a 23-Aug-2019 yuangongji <[email protected]>

cmake: attach doxygen target into all target

v2: Disable non-html generator for doxygen by default
v3: convert cmake option to doxygen config
(cherry picked from commit 1d1c19091f13b7e19015698a23f45

cmake: attach doxygen target into all target

v2: Disable non-html generator for doxygen by default
v3: convert cmake option to doxygen config
(cherry picked from commit 1d1c19091f13b7e19015698a23f454aa85f17ac3)

show more ...


Revision tags: release-2.1.11-stable
# 5b723a66 01-Aug-2019 Azat Khuzhin <[email protected]>

Bump version to 2.1.11-stable (with ABI breakage)


# 305251b9 09-Jul-2019 yuangongji <[email protected]>

cmake: set library names to be the same as with autotools

libtool has VERSION_INFO [1], cmake has SOVERSION/VERSION instead
(although it has different format). Also libtool has RELEASE [2] while
cma

cmake: set library names to be the same as with autotools

libtool has VERSION_INFO [1], cmake has SOVERSION/VERSION instead
(although it has different format). Also libtool has RELEASE [2] while
cmake do not have analog yet [3], hence manual symlinks should be
created.

[1]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
[2]: https://www.gnu.org/software/libtool/manual/html_node/Release-numbers.html
[3]: https://gitlab.kitware.com/cmake/cmake/issues/17652

Plus osx has compatibility_version/current_version dylib properties and
cmake do not have separate properties for them [4], hence manual LINK_FLAGS.
And also there INSTALL_NAME_DIR property which should be adjusted too.

[4]: https://public.kitware.com/Bug/view.php?id=4383

So after all changes, here is an example before/after for osx and linux:

# osx
# autotools
.libs/libevent_pthreads-2.2.1.dylib
.libs/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib
/usr/local/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0)
# cmake
# before patch
lib/libevent_pthreads.2.2.0.dylib
lib/libevent_pthreads.dylib -> libevent_pthreads.2.2.0.dylib
@rpath/libevent_pthreads.2.2.0.dylib (compatibility version 2.2.0, current version 0.0.0)
# after patch
lib/libevent_pthreads-2.2.1.dylib
lib/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib
/vagrant/.cmake/inst/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0)

# linux
# autotools
.libs/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0
.libs/libevent_pthreads-2.2.so.1.0.0
.libs/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0
# cmake
# before patch
lib/libevent_pthreads.so -> libevent_pthreads.so.2.2.0
lib/libevent_pthreads.so.2.2.0
# after patch
lib/libevent_pthreads-2.2.so -> libevent_pthreads-2.2.so.1
lib/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0
lib/libevent_pthreads-2.2.so.1.0.0
lib/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0

Closes: #838 (cherry-picked)
Closes: #760
(cherry picked from commit 669a53f341e192657140952cfe025c260da2b1c1)

show more ...


# f013fc7d 08-Jul-2019 Keith Smiley <[email protected]>

Enable _GNU_SOURCE for Android

When targeting the Android NDK _GNU_SOURCE is not enabled by default:

```
/*
* With bionic, you always get all C and POSIX API.
*
* If you want BSD and/or GNU

Enable _GNU_SOURCE for Android

When targeting the Android NDK _GNU_SOURCE is not enabled by default:

```
/*
* With bionic, you always get all C and POSIX API.
*
* If you want BSD and/or GNU extensions, _BSD_SOURCE and/or _GNU_SOURCE are
* expected to be defined by callers before *any* standard header file is
* included.
*
* In our header files we test against __USE_BSD and __USE_GNU.
*/
#if defined(_GNU_SOURCE)
# define __USE_BSD 1
# define __USE_GNU 1
#endif
```

Because of this `pipe2` is not available:

```
#if defined(__USE_GNU)
int pipe2(int __fds[2], int __flags) __INTRODUCED_IN(9);
#endif
```

The function used to check if it does exist:

```
CHECK_FUNCTION_EXISTS_EX(pipe2 EVENT__HAVE_PIPE2)
```

Just check that the _linking_ succeeds, which it does, it's just not
visible in the import, leading to a warning (or error):

```
evutil.c:2637:6: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0)
^
```

When targeting the NDK it should be safe to always opt into this. Clang
would pass the right flag for us automatically _if_ the source was C++
instead of C.

(cherry picked from commit 41c95abb9930b0c13c238e110b857acb810ad7b9)

show more ...


123456