← Commit list

7484874fdf

Viktor Szakats
Viktor Szakats
2026-07-27
SUCCESS Duration: 177s

Subject

cmake: verify if options are listed in `INSTALL-CMAKE.md`

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

.github/workflows/checksrc.yml+4 -2
@@ -84,9 +84,11 @@ jobs:
source ~/venv/bin/activate
scripts/cmakelint.sh
+ - name: 'cmake options in documentation'
+ run: scripts/cmakeopts.sh
+
- name: 'perlcheck'
- run: |
- scripts/perlcheck.sh
+ run: scripts/perlcheck.sh
- name: 'ruff'
run: |
docs/INSTALL-CMAKE.md+1 -0
@@ -203,6 +203,7 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
- `CURL_COMPLETION_FISH_DIR`: Custom fish completion install directory.
- `CURL_COMPLETION_ZSH`: Install zsh completions. Default: `OFF`
- `CURL_COMPLETION_ZSH_DIR`: Custom zsh completion install directory.
+- `CURL_DEBUG_GLOBAL_MEM`: Debug `curl_global_init_mem`. Default: `OFF`
- `CURL_DEFAULT_SSL_BACKEND`: Override default TLS backend in MultiSSL builds.
Accepted values in order of default priority:
`wolfssl`, `gnutls`, `mbedtls`, `openssl`, `schannel`, `rustls`
scripts/Makefile.am+3 -3
@@ -25,9 +25,9 @@
EXTRA_DIST = coverage.sh completion.pl firefox-db2pem.sh checksrc.pl \
checksrc-all.pl mk-ca-bundle.pl mk-unity.pl schemetable.c cd2nroff nroff2cd \
cdall cd2cd managen dmaketgz maketgz release-tools.sh verify-release \
- cmakelint.sh mdlinkcheck CMakeLists.txt perlcheck.sh pythonlint.sh \
- spacecheck.pl randdisable wcurl top-complexity extract-unit-protos \
- .checksrc badwords badwords-all badwords.txt top-length
+ cmakelint.sh cmakeopts.sh mdlinkcheck CMakeLists.txt perlcheck.sh \
+ pythonlint.sh spacecheck.pl randdisable wcurl top-complexity \
+ extract-unit-protos .checksrc badwords badwords-all badwords.txt top-length
dist_bin_SCRIPTS = wcurl
scripts/cmakeopts.sh+33 -0
@@ -0,0 +1,33 @@
+#!/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}"