It did not work before correctly anyway, since cmake do not reset cache
entries by default, so that reset to "beta" didn't work.
But I don't think that making this variable cached is useful, so let's
remove this.
And according to f8d80a285cf941505277d9060d0357b5b7e543d2 ("Bump version
to 2.1.3-alpha-dev") numeric version have 1 at the end, since it means
"-dev".
P.S. in referenced commit I made a mistake and instead of *-rc* I wrote
*-beta*.
See-also: f4489b8323cda0bf8eed7c1353911a852d7a947c ("Bump version to
2.1.7-beta everywhere")
- do not use compiler check from the root cmake rules with syntax error,
let CodeCoverage check it
- fix CodeCoverage to check C compiler not CXX
- case insensitive checking of CMAKE_BUILD_TYPE
- replace flags with --coverage, and fix flags with linking with
--coverate, otherwise it will not compile during checking flags and
fails.
python version check removed in a4d044c0cd97f68b4b3dde414b83d609719d33d7
("cmake: use PYTHON_EXECUTABLE to find python2"), but in
bcb990ab7cf4921c2c30a1aa4fcb4c0131fffe94 ("cmake/win32: fix running
regress, but fixing finding python2 interpreter") we set
PYTHON_EXECUTABLE only if it exists.
- Remove a redundant check on netdb.h (EVENT__HAVE_NETDB_H).
- Properly setup EVENT__SIZEOF_SSIZE_T for the case where "ssize_t" is
not "int".
- Remove unused EVENT__HAVE_PTHREAD.
- Set EVENT__HAVE_LIBZ instead of EVENT__HAVE_ZLIB (and remove the
latter).
Closes: #391 (cherry-picked from PR)
According to solaris docs:
"One instance of a SIGCHLD signal is queued for each child process whose
status has changed. If waitpid() returns because the status of a child
process is available, and WNOWAIT was not specified in options, any pending
SIGCHLD signal associated with the process ID of that child process is
discarded. Any other pending SIGCHLD signals remain pending."
And interesting thing that it works if you add sleep(1) before waitpid(), and
also if you run with --verbose (some race or what).
But linux doesn't support WNOWAIT in waitpid() so add detection into
cmake/autotools.
Fixes: #387
Link: https://bugzilla.redhat.com/show_bug.cgi?id=840782
Otherwise we will not detect next functions for instance:
- gethostbyname_r # and related
And now both autotools/cmake builds passes all regress tests in basic env (on
solaris of course).
Fixes: dns/client_fail_requests_getaddrinfo
- add_compiler_flags() must accept array IOW just ARGN will be enoough
- add_compiler_flags() called with variable name instead of it's value
P.S. and fix some alignments issues
P.P.S. more cmake issues expected since now CFLAGS actually works
P.P.P.S. some issues with cmake cache is possible, so just reset it
According to https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html:
-Wswitch-enum
Warn whenever a switch statement has an index of enumerated type and lacks a
case for one or more of the named codes of that enumeration. case labels
outside the enumeration range also provoke warnings when this option is used.
The only difference between -Wswitch and this option is that this option
gives a warning about an omitted enumeration code even if there is a *default
label*.
Since ssize_it is POSIX, windows/VS also have this but with BaseTsd.h, plus the
logic prefers "ssize_t" (lower) instead of "SSIZE_T" (upper) when the latest
only available -- fix this too.
Refs: #311
CMake configuration files are intended to be used by other projects to find the library. Specifically the CMake find_package command can use it to find all files related to the project.
The idea is to support 2 different CMake configuration files for Libevent. One if you simply build libevent that is generated for the build tree.
And a second one that is generated for an install target that will be installed on the system and point to where on the system the lib files and such can be find.
So for instance, in the build tree the config would set the cmake variable `LIBEVENT_INCLUDE_DIRS` to `/path/to/libevent/build/include`.
And for the system config it would be set to `/usr/local/include` (or whatever target the user chose when running cmake).
27bd9faf498b91923296cc91643e03ec4055c230 changed this behavior so that both configs would point to the system wide path `/usr/local/include`
This meant that projects just wanting to import directly for the build tree would fail.
This fixes following problems in shared library build:
* visibility=hidden was not enabled for gcc because of incorrect variable name
* test programs that need internal APIs caused link errors
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.
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?