cmake: show warning if libpsl is not found
Also:
- explicitly disable libpsl in CI to avoid configure warning, where
necessary.
- add TODO to make this warning an error (to match autotools.)
Follow-up to 2998874bb6 #12661
Closes #14533
This commit is contained in:
parent
c90a3f16b8
commit
2401ee68a4
2
.github/workflows/awslc.yml
vendored
2
.github/workflows/awslc.yml
vendored
@ -114,7 +114,7 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install cmake stunnel4
|
sudo apt-get install cmake stunnel4 libpsl-dev
|
||||||
# ensure we don't pick up openssl in this build
|
# ensure we don't pick up openssl in this build
|
||||||
sudo apt remove --yes libssl-dev
|
sudo apt remove --yes libssl-dev
|
||||||
sudo python3 -m pip install impacket
|
sudo python3 -m pip install impacket
|
||||||
|
|||||||
4
.github/workflows/configure-vs-cmake.yml
vendored
4
.github/workflows/configure-vs-cmake.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
- name: run cmake
|
- name: run cmake
|
||||||
run: |
|
run: |
|
||||||
cmake -B build
|
cmake -B build -DCURL_USE_LIBPSL=OFF
|
||||||
|
|
||||||
- name: compare generated curl_config.h files
|
- name: compare generated curl_config.h files
|
||||||
run: ./.github/scripts/cmp-config.pl lib/curl_config.h build/lib/curl_config.h
|
run: ./.github/scripts/cmp-config.pl lib/curl_config.h build/lib/curl_config.h
|
||||||
@ -62,7 +62,7 @@ jobs:
|
|||||||
|
|
||||||
- name: run cmake
|
- name: run cmake
|
||||||
run: |
|
run: |
|
||||||
cmake -B build \
|
cmake -B build -DCURL_USE_LIBPSL=OFF \
|
||||||
"-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
|
"-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
|
||||||
-DCURL_USE_LIBSSH2=OFF
|
-DCURL_USE_LIBSSH2=OFF
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/distcheck.yml
vendored
2
.github/workflows/distcheck.yml
vendored
@ -118,7 +118,7 @@ jobs:
|
|||||||
echo "::stop-commands::$(uuidgen)"
|
echo "::stop-commands::$(uuidgen)"
|
||||||
tar xvf curl-99.98.97.tar.gz
|
tar xvf curl-99.98.97.tar.gz
|
||||||
pushd curl-99.98.97
|
pushd curl-99.98.97
|
||||||
cmake -B build -DCURL_WERROR=ON
|
cmake -B build -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF
|
||||||
make -C build -j5
|
make -C build -j5
|
||||||
name: 'verify out-of-tree cmake build'
|
name: 'verify out-of-tree cmake build'
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@ -598,7 +598,7 @@ jobs:
|
|||||||
"-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
|
"-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
|
||||||
-DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF \
|
-DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF \
|
||||||
-DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF -DUSE_APPLE_IDN=OFF \
|
-DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF -DUSE_APPLE_IDN=OFF \
|
||||||
-DCURL_USE_LIBSSH2=OFF \
|
-DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF \
|
||||||
${options}
|
${options}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
3
.github/workflows/windows.yml
vendored
3
.github/workflows/windows.yml
vendored
@ -296,6 +296,7 @@ jobs:
|
|||||||
-DCURL_WERROR=ON \
|
-DCURL_WERROR=ON \
|
||||||
-DBUILD_EXAMPLES=ON \
|
-DBUILD_EXAMPLES=ON \
|
||||||
-DENABLE_WEBSOCKETS=ON \
|
-DENABLE_WEBSOCKETS=ON \
|
||||||
|
-DCURL_USE_LIBPSL=OFF \
|
||||||
${{ matrix.config }}
|
${{ matrix.config }}
|
||||||
|
|
||||||
- name: 'cmake configure log'
|
- name: 'cmake configure log'
|
||||||
@ -373,7 +374,7 @@ jobs:
|
|||||||
plat: 'uwp'
|
plat: 'uwp'
|
||||||
type: 'Debug'
|
type: 'Debug'
|
||||||
tflags: 'skipall'
|
tflags: 'skipall'
|
||||||
config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
|
config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DCURL_USE_LIBPSL=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
|
||||||
- name: 'libressl'
|
- name: 'libressl'
|
||||||
install: 'brotli zlib zstd libpsl nghttp2 libressl libssh2[core,zlib]'
|
install: 'brotli zlib zstd libpsl nghttp2 libressl libssh2[core,zlib]'
|
||||||
arch: 'x64'
|
arch: 'x64'
|
||||||
|
|||||||
@ -1047,13 +1047,15 @@ mark_as_advanced(CURL_USE_LIBPSL)
|
|||||||
set(USE_LIBPSL OFF)
|
set(USE_LIBPSL OFF)
|
||||||
|
|
||||||
if(CURL_USE_LIBPSL)
|
if(CURL_USE_LIBPSL)
|
||||||
find_package(LibPSL)
|
find_package(LibPSL) # TODO: add REQUIRED to match autotools
|
||||||
if(LIBPSL_FOUND)
|
if(LIBPSL_FOUND)
|
||||||
list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES})
|
list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES})
|
||||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl")
|
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl")
|
||||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPSL_INCLUDE_DIRS}")
|
list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPSL_INCLUDE_DIRS}")
|
||||||
include_directories(${LIBPSL_INCLUDE_DIRS})
|
include_directories(${LIBPSL_INCLUDE_DIRS})
|
||||||
set(USE_LIBPSL ON)
|
set(USE_LIBPSL ON)
|
||||||
|
else()
|
||||||
|
message(WARNING "libpsl is enabled, but not found.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,8 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
|
|||||||
"-DENABLE_DEBUG=${DEBUG}" \
|
"-DENABLE_DEBUG=${DEBUG}" \
|
||||||
"-DENABLE_UNICODE=${ENABLE_UNICODE}" \
|
"-DENABLE_UNICODE=${ENABLE_UNICODE}" \
|
||||||
'-DCMAKE_INSTALL_PREFIX=C:/curl' \
|
'-DCMAKE_INSTALL_PREFIX=C:/curl' \
|
||||||
"-DCMAKE_BUILD_TYPE=${PRJ_CFG}"
|
"-DCMAKE_BUILD_TYPE=${PRJ_CFG}" \
|
||||||
|
'-DCURL_USE_LIBPSL=OFF'
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
if ! cmake --build _bld --config "${PRJ_CFG}" --parallel 2 -- ${BUILD_OPT:-}; then
|
if ! cmake --build _bld --config "${PRJ_CFG}" --parallel 2 -- ${BUILD_OPT:-}; then
|
||||||
if [ "${PRJ_GEN}" = 'Visual Studio 9 2008' ]; then
|
if [ "${PRJ_GEN}" = 'Visual Studio 9 2008' ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user