summaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* util: make the qsort_r check work on macOSEtienne Samson2018-08-242-0/+125
| | | | | | | | This performs a compile-check by using CMake support, to differentiate the GNU version from the BSD version of qsort_r. Module taken from 4f252abea5f1d17c60f6ff115c9c44cc0b6f1df6, which I've checked against CMake 2.8.11.
* cmake: detect and use libc-provided iconvPatrick Steinhardt2018-08-241-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While most systems provide a separate iconv library against which applications can link, musl based systems do not provide such a library. Instead, iconv functions are directly included in the C library. As our current CMake module to locate the iconv library only checks whether a library exists somewhere in the typical library directories, we will never build libgit2 with libiconv support on such systems. Extend the iconv module to also search whether libc provides iconv functions, which we do by checking whether the `iconv_open` function exists inside of libc. If this is the case, we will default to use the libc provided one instead of trying to use a separate libiconv. While this changes which iconv we use on systems where both libc and an external libiconv exist, to the best of my knowledge common systems only provide either one or the other. Note that libiconv support in musl is held kind of basic. To quote musl libc's page on functional differences from glibc [1]: The iconv implementation musl is very small and oriented towards being unobtrusive to static link. Its character set/encoding coverage is very strong for its size, but not comprehensive like glibc’s. As we assume iconv to be a lot more capable than what musl provides, some of our tests will fail if using iconv on musl-based platforms. [1]: https://wiki.musl-libc.org/functional-differences-from-glibc.html
* cmake: error out if required C flags are not supportedPatrick Steinhardt2018-08-031-1/+13
| | | | | | | We do want to notify users compiling our source code early on if they try to use C flags which aren't supported. Add a new macro `AddCFlag`, which results in a fatal error in case the flag is not supported, and use it for our fuzzing flags.
* cmake: resolve libraries found by pkg-configPatrick Steinhardt2018-05-091-0/+28
| | | | | | | | | | | | | | | | | | | Libraries found by CMake modules are usually handled with their full path. This makes linking against those libraries a lot more robust when it comes to libraries in non-standard locations, as otherwise we might mix up libraries from different locations when link directories are given. One excemption are libraries found by PKG_CHECK_MODULES. Instead of returning libraries with their complete path, it will return the variable names as well as a set of link directories. In case where multiple sets of the same library are installed in different locations, this can lead the compiler to link against the wrong libraries in the end, when link directories of other dependencies are added. To fix this shortcoming, we need to manually resolve library paths returned by CMake against their respective library directories. This is an easy task to do with `FIND_LIBRARY`.
* mbedtls: initial supportEtienne Samson2018-04-111-0/+93
|
* cmake: move ENABLE_WARNINGS to a moduleethomson/cmake_fixesEdward Thomson2018-02-051-0/+14
|
* cmake: Move IDE source munging to a moduleEdward Thomson2018-02-021-0/+22
| | | | | Move the odd code that provides a hierarchical display for projects within the IDEs to its own module.
* cmake: move nanosecond detection to a moduleEdward Thomson2018-02-021-0/+20
| | | | Move the nanosecond detection in time structures to its own module.
* cmake: make our macOS helpers more CMake-yEtienne Samson2017-10-232-14/+50
|
* cmake: fix indentation before enhancingEtienne Samson2017-10-232-12/+12
|
* Don't search iconv in /opt/localJiří Techet2015-05-011-3/+0
| | | | | | | Since OpenSSL isn't used any more on OS X, there is no dependency on any MacPorts library under /opt/local and there is no danger of conflicts between MacPorts and system iconv. For this reason the system iconv can always be used now.
* Add a SecureTransport TLS channelCarlos Martín Nieto2015-04-232-0/+18
| | | | | As an alternative to OpenSSL when we're on OS X. This one can actually take advantage of stacking the streams.
* Find libssh2 via pkg-configcmn/pkg-config-sshCarlos Martín Nieto2014-12-051-44/+0
| | | | | | We don't really need our own module to find libssh2. Using pkg-config lets the standard tool do the work for us and let us fit more naturally in the workflow as we respect the pkg-config search paths.
* Add GSSAPI support for SPNEGO/Kerberos auth over HTTPEdward Thomson2014-08-151-0/+324
|
* Introduce AddCFlagIfSupported CMake macroJacques Germishuys2014-04-191-0/+16
|
* We never search for libiconv via pkg-configSascha Cunz2014-01-301-1/+1
| | | | | So we actually also never know that we can set a dependency on it in pkg-config. Instead always give it the -L and -l options.
* Find and use a MacPorts version of libiconv. Fixes #2017.Sascha Cunz2014-01-301-2/+10
| | | | | | | - Add correct -I, -L and -l flags - Search for libiconv in /opt/local/[include|lib] before in the system path. See #2017 for details. - Give splitted -L and -l arguments to pkg-config
* Cleanup FindIconv.cmakeSascha Cunz2014-01-301-12/+5
| | | | | Doesn't change anything. Just removes stuff that was probably missed to remove when this was imported.
* Improve iconv finding for cmakeRussell Belfer2013-12-021-0/+42
| | | | | | * add FindIconv helper for CMake iconv detection * only default using iconv to ON for MacOS * update pkg-config generation to include iconv dependency better
* Build with the system's http-parser installation if availableVeeti Paananen2013-05-301-0/+39
|
* Changed case of FindLibSSH2.cmake to FindLIBSSH2.cmakeBrad Morgan2013-05-151-0/+0
|
* Renamed FindLibSSH2.cmakeBrad Morgan2013-05-151-0/+0
|
* Added libssh2 cmake moduleBrad Morgan2013-05-071-0/+44