]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: try well-known send/recv signature for Apple
authorGregor Jasny <gjasny@googlemail.com>
Mon, 31 May 2021 19:36:37 +0000 (21:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 1 Jun 2021 06:44:07 +0000 (08:44 +0200)
commite5dfc88eb81e5277753c56f4ed74b2bc190261fc
tree4c1b870562361e50b54f13a080df19a5bdd21228
parentef1a917a1173775d48ebdb425cd680e95abbf9f2
cmake: try well-known send/recv signature for Apple

The CMake `try_compile` command is especially slow for
the Xcode generator. With this patch applied it first tests
for the currently used (and Open Group specified) send/recv
signature. In case this fails testing falls-back to the
permutations.

speed-up:

```
time cmake .. -GNinja -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DCMAKE_USE_LIBSSH2=OFF
before: 11.64s user 11.09s system 55% cpu 40.754 total
after:   7.84s user 6.57s  system 51% cpu 28.074 total
```

```
time cmake .. -GXcode -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DCMAKE_USE_LIBSSH2=OFF
before: 217.07s user 104.15s system 60% cpu 8:51.79 total
after:  108.76s user  51.80s system 58% cpu 4:32.58 total
```

Closes #7158
CMake/OtherTests.cmake