aboutsummaryrefslogtreecommitdiff
path: root/CMake/OtherTests.cmake
AgeCommit message (Collapse)Author
2020-04-14cmake: Avoid MSVC C4273 warnings in send/recv checksBrad King
We use `check_c_source_compiles` to check possible send/recv signatures by reproducing the forward declarations from system headers. On Windows the `winsock2.h` header adds dll linkage settings to its forward declaration. If ours does not match the compiler warns: warning C4273: 'recv': inconsistent dll linkage Add `WINSOCK_API_LINKAGE` to our test signatures when it is defined so that our linkage is consistent with that from `winsock2.h`. Fixes #4764 Closes #5232
2020-03-24copyright: fix out-of-date copyright ranges and missing headersDaniel Stenberg
Reported by the new script 'scripts/copyright.pl'. The script has a regex whitelist for the files that don't need copyright headers. Removed three (mostly usesless) README files from docs/ Closes #5141
2020-02-29CMake: clean up and improve build proceduresRolf Eike Beer
- remove check for unsupported old CMake versions - do not link to c-ares library twice - modernize custom Find modules - FindLibSSH2: - pass version to FPHSA to show it in the output - use LIBSSH2_VERSION define to extract the version number in one shot. This variable exists in the header for 10 years. - remove unneeded code - FindNGHTTP2.cmake: - drop needless FPHSA argument - mark found variables as advanced - FindNSS.cmake: - show version number - FindCARES.cmake: - drop default paths - use FPHSA instead of checking things by hand - remove needless explict variable dereference - simplify count_true() - allow all policies up to version 3.16 to be set to NEW - do not rerun check for -Wstrict-aliasing=3 every time In contrast to every other compiler flag this has a = in it, which CMake can't have in a variable name. - only read the interesting strings from curlver.h Reviewed-by: Peter Wu Closes https://github.com/curl/curl/pull/4975
2019-04-10cmake: avoid linking executable for some tests with cmake 3.6+Jakub Zakrzewski
With CMAKE_TRY_COMPILE_TARGET_TYPE set to STATIC_LIBRARY, the try_compile() (which is used by check_c_source_compiles()) will build static library instead of executable. This avoids linking additional libraries in and thus speeds up those checks a little. This commit also avoids #3743 (GSSAPI build errors) on itself with cmake 3.6 or above. That issue was fixed separately for all versions. Ref: #3744
2019-01-16cmake: updated check for HAVE_POLL_FINE to match autotoolsSergei Nikulov
2018-07-09CMake: remove redundant and old end-of-block syntaxRuslan Baratov
Reviewed-by: Jakub Zakrzewski Closes #2715
2017-07-05cmake: fix send/recv argument scanner for windowsDaniel Stenberg
... by simply trying the Windows argument types first. Fixes #1640
2016-11-06cmake: disable poll for macOSPeter Wu
Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce. Fixes #1089
2015-09-23CMake: Put "winsock2.h" before "windows.h" during configure checksJakub Zakrzewski
"windows.h" includes "winsock.h" what causes many redefinition errors if "winsock2.h" is included afterwards and can cause build to fail.
2014-11-03cmake: fix struct sockaddr_storage checkPeter Wu
CHECK_TYPE_SIZE_PREINCLUDE is an internal, undocumented variable which was removed in cmake 2.8.1. According to the MSDN docs[1], inclusion of winsock2.h is sufficient. WIN32_LEAN_AND_MEAN does not really seem to affect the tests, so remove it too[2]. For the non-windows case, remove inet headers as POSIX only requires sys/socket.h. [1]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms740504%28v=vs.85%29.aspx [2]: http://stackoverflow.com/questions/11040133/what-does-defining-win32-lean-and-mean-exclude-exactly Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-03cmake: clean OtherTests, fixing -WerrorPeter Wu
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-08-25Cmake: Possibility to use OpenLDAP, OpenSSL, LibSSH2 on windowsJakub Zakrzewski
At this point I can build libcurl on windows. It provides at least the same list of protocols as for linux build and works with our software.
2010-02-14removed trailing whitespaceYang Tse
2009-06-09ENH: lower case cmake functions and remove tabs and re-indent cmake codeBill Hoffman
2009-04-02Initial CMake scripts (libcurl only), based on the merge of tetest scripts ↵Benoit Neil
and mine. These are far to be functionnal yet. PS: Hello world :)