master
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23###########################################################################
24# Find the ldap library
25#
26# Input variables:
27#
28# - `LDAP_INCLUDE_DIR`: Absolute path to ldap include directory.
29# - `LDAP_LIBRARY`: Absolute path to `ldap` library.
30# - `LDAP_LBER_LIBRARY`: Absolute path to `lber` library.
31#
32# Defines:
33#
34# - `LDAP_FOUND`: System has ldap.
35# - `LDAP_VERSION`: Version of ldap.
36# - `CURL::ldap`: ldap library target.
38set(_ldap_pc_requires "ldap" "lber")
40if(CURL_USE_PKGCONFIG AND
41 NOT DEFINED LDAP_INCLUDE_DIR AND
42 NOT DEFINED LDAP_LIBRARY AND
43 NOT DEFINED LDAP_LBER_LIBRARY)
44 find_package(PkgConfig QUIET)
45 pkg_check_modules(_ldap ${_ldap_pc_requires})
46endif()
48if(_ldap_FOUND)
49 set(LDAP_FOUND TRUE)
50 set(LDAP_VERSION ${_ldap_ldap_VERSION})
51 message(STATUS "Found LDAP (via pkg-config): ${_ldap_INCLUDE_DIRS} (found version \"${LDAP_VERSION}\")")
52else()
53 set(_ldap_pc_requires "") # Depend on pkg-config only when found via pkg-config
55 # On Apple the SDK LDAP gets picked up from
56 # 'MacOSX.sdk/System/Library/Frameworks/LDAP.framework/Headers', which contains
57 # ldap.h and lber.h both being stubs to include <ldap.h> and <lber.h>.
58 # This causes an infinite inclusion loop in compile. Also do this for libraries
59 # to avoid picking up the 'ldap.framework' with a full path.
60 set(_save_cmake_system_framework_path ${CMAKE_SYSTEM_FRAMEWORK_PATH})
61 set(CMAKE_SYSTEM_FRAMEWORK_PATH "")
62 find_path(LDAP_INCLUDE_DIR NAMES "ldap.h")
63 find_library(LDAP_LIBRARY NAMES "ldap")
64 find_library(LDAP_LBER_LIBRARY NAMES "lber")
65 set(CMAKE_SYSTEM_FRAMEWORK_PATH ${_save_cmake_system_framework_path})
67 unset(LDAP_VERSION CACHE)
68 if(LDAP_INCLUDE_DIR AND EXISTS "${LDAP_INCLUDE_DIR}/ldap_features.h")
69 set(_version_regex1 "#[\t ]*define[\t ]+LDAP_VENDOR_VERSION_MAJOR[\t ]+([0-9]+).*")
70 set(_version_regex2 "#[\t ]*define[\t ]+LDAP_VENDOR_VERSION_MINOR[\t ]+([0-9]+).*")
71 set(_version_regex3 "#[\t ]*define[\t ]+LDAP_VENDOR_VERSION_PATCH[\t ]+([0-9]+).*")
72 file(STRINGS "${LDAP_INCLUDE_DIR}/ldap_features.h" _version_str1 REGEX "${_version_regex1}")
73 file(STRINGS "${LDAP_INCLUDE_DIR}/ldap_features.h" _version_str2 REGEX "${_version_regex2}")
74 file(STRINGS "${LDAP_INCLUDE_DIR}/ldap_features.h" _version_str3 REGEX "${_version_regex3}")
75 string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
76 string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
77 string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
78 set(LDAP_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
79 unset(_version_regex1)
80 unset(_version_regex2)
81 unset(_version_regex3)
82 unset(_version_str1)
83 unset(_version_str2)
84 unset(_version_str3)
85 endif()
87 include(FindPackageHandleStandardArgs)
88 find_package_handle_standard_args(LDAP
89 REQUIRED_VARS
90 LDAP_INCLUDE_DIR
91 LDAP_LIBRARY
92 LDAP_LBER_LIBRARY
93 VERSION_VAR
94 LDAP_VERSION
95 )
97 if(LDAP_FOUND)
98 set(_ldap_INCLUDE_DIRS ${LDAP_INCLUDE_DIR})
99 set(_ldap_LIBRARIES ${LDAP_LIBRARY} ${LDAP_LBER_LIBRARY})
100 endif()
102 mark_as_advanced(LDAP_INCLUDE_DIR LDAP_LIBRARY LDAP_LBER_LIBRARY)
103endif()
105if(LDAP_FOUND)
106 if(NOT TARGET CURL::ldap)
107 add_library(CURL::ldap INTERFACE IMPORTED)
108 set_target_properties(CURL::ldap PROPERTIES
109 INTERFACE_LIBCURL_PC_MODULES "${_ldap_pc_requires}"
110 INTERFACE_COMPILE_OPTIONS "${_ldap_CFLAGS}"
111 INTERFACE_INCLUDE_DIRECTORIES "${_ldap_INCLUDE_DIRS}"
112 INTERFACE_LINK_DIRECTORIES "${_ldap_LIBRARY_DIRS}"
113 INTERFACE_LINK_LIBRARIES "${_ldap_LIBRARIES}")
114 endif()
115endif()
Diagnostics4 git calls · 32 ms
CallStatusSizeTime032 ms
discover200152 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=2 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=149 git.response.cache=HIT git.response.duration_ms=2 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=149 git.pkt.payload.max=78 git.ls_refs.count=2 git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=28 git.response.bytes=293470 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=10 git.pkt.data=8 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=293470 git.pkt.payload.max=65516 git.sideband.band1.bytes=293354 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=87 git.pack.bytes=293354 git.pack.ofs_delta=0 git.pack.ref_delta=1 git.pack.chain.max=1 git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0 git.pack.full=86Open pack map
fetch2001.8 KiB · hit28 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=1801 git.response.cache=HIT git.response.duration_ms=28 git.fetch.wants=8902b23f8dd48f616b8567307422b7e8aa4ca366 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1801 git.pkt.payload.max=1780 git.sideband.band1.bytes=1779 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
- Ref
- refs/heads/master
- Commit
- 31c911efe5652725e930f4d2e60c9060e5f6646d
- cf-ray
- a5e2db4c6e32c125
- Request
- a5d4480b…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format