mirror of
https://github.com/curl/curl
synced 2026-08-25 12:32:35 -04:00
Also: - add one debug option to pass the test. Ref: https://github.com/curl/curl/discussions/14885#discussioncomment-10632311 Closes #22404
33 lines
784 B
Bash
Executable file
33 lines
784 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Copyright (C) Viktor Szakats
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
|
|
# Verify if CMake options are documented
|
|
|
|
set -eu
|
|
|
|
cd -- "$(dirname "$0")"/..
|
|
|
|
anyerr=0
|
|
while read -r opt; do
|
|
if ! grep -q -F -- "- \`$opt\`: " docs/INSTALL-CMAKE.md; then
|
|
echo "CMake option missing from documentation: '$opt'"
|
|
anyerr=1
|
|
fi
|
|
done < <(
|
|
{
|
|
git grep -o -E 'option\([A-Z][A-Z0-9_]+' ':!tests/cmake' |
|
|
grep -i cmake |
|
|
sed -E -e 's/^.+://g' -e 's/option\(//g'
|
|
|
|
git grep -h -o -E 'curl_dependency_option\([A-Z][A-Z0-9_]+' |
|
|
sed -e 's/curl_dependency_option(//g'
|
|
|
|
git grep -h -o -E "^# - \`[A-Z0-9_]+\`: " ':CMake/Find**' |
|
|
grep -o -E '[A-Z0-9_]+' |
|
|
grep -v -E '(_FOUND|_VERSION|NGTCP2_CRYPTO_BACKEND)'
|
|
} | sort -u
|
|
)
|
|
|
|
exit "${anyerr}"
|