| 813cc739 | 20-Jan-2020 |
yuangongji <[email protected]> |
cmake: set rpath for libraries on linux
(cherry picked from commit ce8be2385b5fee16859a630fca0c98ad290c8e21) |
| 2cfa7ff7 | 28-Jun-2020 |
Azat Khuzhin <[email protected]> |
Bump version to 2.1.12-stable (w/o ABI breakage) |
| 9a94cd9b | 27-May-2020 |
yuangongji <[email protected]> |
remove FindGit.cmake, improve `git describe` command
(cherry picked from commit a9aa2b3607c8adf9846aa6a01e070130f4d6dcb9) |
| a6974d11 | 01-May-2020 |
yuangongji <[email protected]> |
cmake: set a default value for LIBEVENT_STATIC_LINK
(cherry picked from commit 86eafc03433cb5719e5b75ff99ffab8633433a17) |
| 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 ...
|
| 640f9cf6 | 03-Mar-2020 |
Mario Emmenlauer <[email protected]> |
LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default
The current cmake/LibeventConfig.cmake.in has a few problems and I'm not sure how cleanly developed it is.
LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default
The current cmake/LibeventConfig.cmake.in has a few problems and I'm not sure how cleanly developed it is. It seems rater complex for the little things I would assume it needs to do.
I found two problems that are fixed in this PR:
- If the downstream user does not explicitly set LIBEVENT_STATIC_LINK before calling find_package(libevent) then they will not be able to detect the static library, even if its the only one that exists. Since this may be rather strict, I've changed the behavior so that LIBEVENT_STATIC_LINK can be set to ON or OFF, but if unset, it defaults to whatever configuration libevent was built as.
- The other problem is a bug. The package configuration needs to unset CMAKE_FIND_LIBRARY_SUFFIXES after use, otherwise all packages that are detected after libevent will be "infected" by this setting. This was a significant problem for us, and is very hard to detect in downstream project, because the order of dependencies will lead to different search results.
(cherry picked from commit 1675a55620e6f0bbba5776f2df72cd48920421c2)
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 ...
|
| 47eb8c12 | 30-Nov-2019 |
Azat Khuzhin <[email protected]> |
cmake: use CMAKE_LIBRARY_OUTPUT_DIRECTORY for the final shared library symlink
Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools") (cherry picked from commit b9f442e2d7af8b
cmake: use CMAKE_LIBRARY_OUTPUT_DIRECTORY for the final shared library symlink
Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools") (cherry picked from commit b9f442e2d7af8b01cd34f75f2f404763b76d42dc)
show more ...
|
| 1c047618 | 07-Nov-2019 |
yuangongji <[email protected]> |
cmake: improve package config file
(cherry picked from commit dc4be869d5009f38e0ef02ff07dd799f9c2fef2f) |
| a9d1121d | 25-Oct-2019 |
yuangongji <[email protected]> |
cmake: eliminate duplicate installation of public headers
(cherry picked from commit 5fe83d7433022e29a401753f64ec78faaf25e0a7) |
| 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 ...
|
| 5b723a66 | 01-Aug-2019 |
Azat Khuzhin <[email protected]> |
Bump version to 2.1.11-stable (with ABI breakage) |
| 596855f7 | 11-Jul-2019 |
Azat Khuzhin <[email protected]> |
cmake: install shared library only if it was requested
$ cmake -DEVENT__LIBRARY_TYPE=static .. ... CMake Error: Error evaluating generator expression:
$<TARGET_FILE_DIR:event_core_share
cmake: install shared library only if it was requested
$ cmake -DEVENT__LIBRARY_TYPE=static .. ... CMake Error: Error evaluating generator expression:
$<TARGET_FILE_DIR:event_core_shared>
No target "event_core_shared"
Fixes: #853 Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools") (cherry picked from commit 55d1e20e1a5dbd1188f4143968f7cafee33edc0d)
show more ...
|
| 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 ...
|
| 2d65071c | 09-Jun-2019 |
yuangongji <[email protected]> |
cmake: add missing autotools targets (doxygen, uninstall, event_rpcgen.py)
Close: #832 (cherry-picked) (cherry picked from commit 7201062f3ef505a77baa6ccaf1cf73812462308a) |
| f5bfd721 | 25-May-2019 |
Azat Khuzhin <[email protected]> |
Bump version to 2.1.10-stable everywhere |
| c5cf4a5c | 01-Mar-2019 |
Enji Cooper <[email protected]> |
Fix typos in a comment describing the purpose of `VersionViaGit.cmake`
Signed-off-by: Enji Cooper <[email protected]> (cherry picked from commit 0b468bb07e3476d06907ca6c8e5c24bbb05e31a4) |
| 900f5c45 | 03-Feb-2019 |
Azat Khuzhin <[email protected]> |
Bump version to 2.1.9-beta everywhere |
| eb10a738 | 22-Nov-2018 |
Azat Khuzhin <[email protected]> |
cmake: introduce EVENT__LIBRARY_TYPE option
Long time ago in [1] cmake build was forced to compile both libraries (SHARED and STATIC), since this is how our autotools build works.
[1]: 7182c2f561
cmake: introduce EVENT__LIBRARY_TYPE option
Long time ago in [1] cmake build was forced to compile both libraries (SHARED and STATIC), since this is how our autotools build works.
[1]: 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED and STATIC libraries (like autoconf does)")
And there is no way to configure this (and indeed you need to do this for MSVC for example), so let's introduce option for this -- EVENT__LIBRARY_TYPE.
Plus now we have INTERFACE libraries, that we can use internally in libevent's cmake rules to avoid strict to _shared/_static variant of the libraries to link with samples/tests (we prefer SHARED over STATIC for linking).
Also bump minimal cmake required version to 3.1 by the following reasons: - 3.1 is required for RPATH configuration under APPLE - 3.0 is required for add_library(INTERFACE) (did not found it in 2.8.x documentation) - remove extra conditions (anyway 3.1 was release 4 years ago, so I guess that most of the systems will have it)
(cherry picked from commit c9a073eae8f86a74fbbb125db34b881ef40108b7)
show more ...
|
| 235b5521 | 18-Oct-2018 |
Azat Khuzhin <[email protected]> |
Make cmake's check_const_exists() rely on cache
(cherry picked from commit 4c61a04cd5207f2140b65f955559aa4ffc848e9c) |
| 44fa5b19 | 22-Apr-2018 |
Azat Khuzhin <[email protected]> |
Fix CheckFunctionExistsEx() cmake macro on win32
For example under mingw64 it could not detect that strtok_r() exists, because it checks with: void *p = func_name;
And for this you need the funct
Fix CheckFunctionExistsEx() cmake macro on win32
For example under mingw64 it could not detect that strtok_r() exists, because it checks with: void *p = func_name;
And for this you need the function to be defined, so just sync our CheckFunctionExistsEx.c with CheckFunctionExists.c from cmake (and later we should drop them out) since it does correct things to detech functions existence.
Also for WIN32 there is -FIwinsock2.h -FIws2tcpip.h, and I guess that is not works for mingw gcc (since -F in gcc is framework, and in windows -FI is like -include in gcc). But looks like we do not need them already (due to fixed CheckFunctionExistsEx()).
Refs: #605 (cherry picked from commit accf383e044257ecdef002ea255056a5d15a4811)
show more ...
|
| 29590718 | 05-Apr-2018 |
Philip Herron <[email protected]> |
cmake: ensure windows dll's are installed as well as lib files
Closes: #621 (cherry picked from commit 0fa43c99fbba6f3b1827ada98302f548206a358f) |
| 9c720b70 | 19-Aug-2017 |
Carlo Marcelo Arenas Belón <[email protected]> |
configure: avoid false positive in DragonFlyBSD
by default, the max buffer size is 16K and histeresis is at 50%, so a bigger read is needed to unlock writes than you would expect from other BSD (512
configure: avoid false positive in DragonFlyBSD
by default, the max buffer size is 16K and histeresis is at 50%, so a bigger read is needed to unlock writes than you would expect from other BSD (512 bytes)
this doesn't introduce any regression on FreeBSD 11.1, OpenBSD 6.1, NetBSD 7.1, macOS 10.12.6 and of course DragonFlyBSD 4.8.1, and most of them show a max pipe size of 64K, so the read call should drain them all regardless of how conservative they are on the free pipe space they will require (usually 512 bytes) before kevent reports the fd as ready for write.
I couldn't find a reference to which bug this code was trying to look for and it seems to be there from the beginning of git history so it might be no longer relevant.
Issue: #548 (cherry picked from commit 1dfec8a97094a26317eac9b3d8a1c16eb1a7dbea)
show more ...
|
| 5398cbcd | 14-Mar-2017 |
Azat Khuzhin <[email protected]> |
cmake: use APPEND during exporting targets (for old cmake)
On centos with cmake 2.8.12.2: CMake Error at cmake/AddEventLibrary.cmake:92 (export): export called with target "event_extra_shared"
cmake: use APPEND during exporting targets (for old cmake)
On centos with cmake 2.8.12.2: CMake Error at cmake/AddEventLibrary.cmake:92 (export): export called with target "event_extra_shared" which requires target "event_core_shared" that is not in the export list.
If the required target is not easy to reference in this call, consider using the APPEND option with multiple separate calls.
But on newer cmake I guess everything is ok.
Fixes: 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED and STATIC libraries (like autoconf does)")
(cherry picked from commit b1e8a4138f0da3c8a4bc303ff72b620b41c066d6)
show more ...
|