summaryrefslogtreecommitdiff
path: root/CMake/Macros.cmake
Commit message (Collapse)AuthorAgeFilesLines
* copyright: fix out-of-date copyright ranges and missing headersDaniel Stenberg2020-03-241-0/+21
| | | | | | | | | 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
* CMake: Update scripts to use consistent styleRuslan Baratov2018-07-171-40/+4
| | | | | Closes #2727 Reviewed-by: Sergei Nikulov
* CMake: remove redundant and old end-of-block syntaxRuslan Baratov2018-07-091-14/+14
| | | | | Reviewed-by: Jakub Zakrzewski Closes #2715
* cmake: disable tests and man generation if perl/nroff not foundSergei Nikulov2017-10-021-0/+29
| | | | | | | | | | | | Fixes https://github.com/curl/curl/issues/1500 Reported-by: Jay Satiro Fixes https://github.com/curl/curl/pull/1662 Assisted-by: Tom Seddon Assisted-by: dpull@users.noreply.github.com Assisted-by: elelel@users.noreply.github.com Closes https://github.com/curl/curl/pull/1924
* CMake: Simplify if() conditions on check result variablesBrad King2014-11-191-4/+4
| | | | | | | | | | | Remove use of an old hack that takes advantage of the auto-dereference behavior of the if() command to detect if a variable is defined. The hack has the form: if("${VAR} MATCHES "^${VAR}$") where "${VAR}" is a macro argument reference. Use if(DEFINED) instead. This also avoids warnings for CMake Policy CMP0054 in CMake 3.1.
* CMake: Restore order-dependent library checksBrad King2014-11-131-3/+6
| | | | | | | | | | | | | Revert commit 2257deb502 (Cmake: Avoid cycle directory dependencies, 2014-08-22) and add a comment explaining the purpose of the original code. The check_library_exists_concat macro is intended to be called multiple times on a sequence of possibly dependent libraries. Later libraries may depend on earlier libraries when they are static. They cannot be safely linked in reverse order on some platforms. Signed-off-by: Brad King <brad.king@kitware.com>
* CMake: Restore order-dependent header checksBrad King2014-11-131-1/+4
| | | | | | | | | | | | | | | | | Revert commit 1269df2e3b (Cmake: Don't check for all headers each time, 2014-08-15) and add a comment explaining the purpose of the original code. The check_include_file_concat macro is intended to be called multiple times on a sequence of possibly dependent headers. Later headers may depend on earlier headers to provide declarations. They cannot be safely included independently on some platforms. For example, many POSIX APIs document including sys/types.h before some other headers. Also on some OS X versions sys/socket.h must be included before net/if.h or the check for the latter will fail. Signed-off-by: Brad King <brad.king@kitware.com>
* Cmake: Avoid cycle directory dependencies.Jakub Zakrzewski2014-10-091-3/+3
| | | | | | Because we prepended libraries to list, CMake had troubles resolving link directory order as it detected some cycles. Appending to list ensures that dependencies will preceed dependees.
* Cmake: Don't check for all headers each timeJakub Zakrzewski2014-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One header at a time is the right way. Apart from that the output on windows goes from: ... -- Looking for include files I:/src/libssh2-1.4.3/include/libssh2.h, ws2tcpip.h -- Looking for include files I:/src/libssh2-1.4.3/include/libssh2.h, ws2tcpip.h - found -- Looking for 3 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., wins ock2.h -- Looking for 3 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., wins ock2.h - found -- Looking for 4 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., stdi o.h -- Looking for 4 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., stdi o.h - found -- Looking for 5 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., wind ows.h -- Looking for 5 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., wind ows.h - found -- Looking for 6 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., wins ock.h -- Looking for 6 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., wins ock.h - found -- Looking for 7 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., sys/ filio.h -- Looking for 7 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., sys/ filio.h - not found -- Looking for 7 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., sys/ ioctl.h -- Looking for 7 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., sys/ ioctl.h - not found -- Looking for 7 include files I:/src/libssh2-1.4.3/include/libssh2.h, ..., sys/ resource.h ... To much nicer: ... -- Looking for ws2tcpip.h -- Looking for ws2tcpip.h - found -- Looking for winsock2.h -- Looking for winsock2.h - found -- Looking for stdio.h -- Looking for stdio.h - found -- Looking for windows.h -- Looking for windows.h - found -- Looking for winsock.h -- Looking for winsock.h - found -- Looking for sys/filio.h -- Looking for sys/filio.h - not found -- Looking for sys/ioctl.h -- Looking for sys/ioctl.h - not found -- Looking for sys/resource.h
* Cmake: Moved macros out of the main CMakeLists.txtJakub Zakrzewski2014-08-251-0/+89