1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00
curl/CMake
Peter Wu 8cb0101449 cmake: clean OtherTests, fixing -Werror
There were several -Wunused warnings and one duplicate macro definition.
The EXTRA_DEFINES variable of the CurlCheckCSources macro was being
abused ("__unused1\n#undef inline\n#define __unused2", seriously?) to
insert extra C code. Avoid this broken abstraction and use cmake's
check_c_source_compiles directly (works fine with CMake 2.8, maybe
even cmake 2.6).

After cleaning up all related variables (EXTRA_DEFINES,
HEADER_INCLUDES, auxiliary headers_hack), also remove a duplicate
add_headers_include macro and remove duplicate header additions before
the struct timeval check.

Oh, and now the code is converted to use CheckCSourceRuns and
CheckCSourceCompiles, the two curl-specific helpers can be removed.
Unfortunately, the cmake output is now slightly more verbose. Before:

    Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test)
    Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test) - Failed

Since check_c_source_compiles prints the varname, now you see:

    Performing Test curl_cv_func_send_test
    Performing Test curl_cv_func_send_test - Failed
    Tested: int send(int, const void *, size_t, int)

Compared cmake output with each other using vimdiff, no functional
differences were found. Tested with GCC 4.9.1 and Clang 3.5.0.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-03 09:10:54 +01:00
..
Platforms cmake: drop _BSD_SOURCE macro usage 2014-11-03 09:10:54 +01:00
CMakeConfigurableFile.in Initial CMake scripts (libcurl only), based on the merge of tetest scripts and mine. These are far to be functionnal yet. 2009-04-02 13:14:53 +00:00
CurlTests.c cmake: fix gethostby{addr,name}_r in CurlTests 2014-11-03 09:10:54 +01:00
FindCARES.cmake removed execute file permission 2011-12-30 03:53:25 +01:00
FindGSS.cmake Cmake: Build with GSSAPI (MIT or Heimdal) 2014-10-09 13:48:31 +02:00
FindLibSSH2.cmake Cmake: LibSSH2 detection and use. 2014-08-25 12:44:24 +02:00
Macros.cmake Cmake: Avoid cycle directory dependencies. 2014-10-09 13:48:30 +02:00
OtherTests.cmake cmake: clean OtherTests, fixing -Werror 2014-11-03 09:10:54 +01:00
Utilities.cmake ENH: lower case cmake functions and remove tabs and re-indent cmake code 2009-06-09 17:29:16 +00:00