mark_as_advanced(CURL_DISABLE_GETOPTIONS)
option(CURL_DISABLE_GOPHER "disables Gopher" OFF)
mark_as_advanced(CURL_DISABLE_GOPHER)
+option(CURL_DISABLE_HEADERS_API "disables headers-api support" OFF)
+mark_as_advanced(CURL_DISABLE_HEADERS_API)
option(CURL_DISABLE_HSTS "disables HSTS support" OFF)
mark_as_advanced(CURL_DISABLE_HSTS)
option(CURL_DISABLE_HTTP "disables HTTP" OFF)
# the DISABLE options that can be set by configure
my %disable;
+# the DISABLE options that can be set by CMakeLists.txt
+my %disable_cmake;
# the DISABLE options that are used in C files
my %file;
# the DISABLE options that are documented
}
}
+sub scanconf_cmake {
+ my ($f)=@_;
+ open S, "<$f";
+ while(<S>) {
+ if(/(CURL_DISABLE_[A-Z_]+)/g) {
+ my ($sym)=($1);
+ if(not $sym =~ /(CURL_DISABLE_INSTALL|CURL_DISABLE_TESTS|CURL_DISABLE_SRP)/) {
+ $disable_cmake{$sym} = 1;
+ }
+ }
+ }
+ close S;
+}
+
+sub scan_cmake {
+ scanconf_cmake("$root/CMakeLists.txt");
+}
+
sub scan_file {
my ($source)=@_;
open F, "<$source";
}
scan_configure();
+scan_cmake();
scan_sources();
scan_docs();
}
}
+# Check the CMakeLists.txt symbols for use in code
+for my $s (sort keys %disable_cmake) {
+ if(!$file{$s}) {
+ printf "Present in CMakeLists.txt, not used by code: %s\n", $s;
+ $error++;
+ }
+ if(!$docs{$s}) {
+ printf "Present in CMakeLists.txt, not documented in $DOCS: %s\n", $s;
+ $error++;
+ }
+}
+
# Check the code symbols for use in configure
for my $s (sort keys %file) {
if(!$disable{$s}) {
printf "Not set by configure: %s (%s)\n", $s, $file{$s};
$error++;
}
+ if(!$disable_cmake{$s}) {
+ printf "Not set by CMakeLists.txt: %s (%s)\n", $s, $file{$s};
+ $error++;
+ }
if(!$docs{$s}) {
printf "Used in code, not documented in $DOCS: %s\n", $s;
$error++;
printf "Documented but not in configure: %s\n", $s;
$error++;
}
+ if(!$disable_cmake{$s}) {
+ printf "Documented but not in CMakeLists.txt: %s\n", $s;
+ $error++;
+ }
if(!$file{$s}) {
printf "Documented, but not used by code: %s\n", $s;
$error++;