Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake build warnings #360

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.9)
cmake_minimum_required (VERSION 3.9...3.30)

project(maxminddb
LANGUAGES C
Expand Down
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
certain errors occurred. Pull request by pkillarjun. GitHub #356.
* There is now a build target to fuzz the library. Pull request by
pkillarjun. GitHub #357.
* Updated `cmake_minimum_required` to a version range to quiet deprecation
warnings on new CMake versions. Reported by gmou3. GitHub #359.
* The script for generating man pages no longer uses `autodie`. This
eliminates the dependency on `IPC::System::Simple`. Reported by gmou3.
GitHub #359.

## 1.11.0 - 2024-08-21

Expand Down
15 changes: 8 additions & 7 deletions dev-bin/make-man-pages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use strict;
use warnings;
use autodie qw( :all );

use FindBin qw( $Bin );

Expand Down Expand Up @@ -54,7 +53,7 @@ sub _make_man {
'-M', "section:$section",
$input,
'-o', $output,
);
) == 0 or die "Failed to run pandoc: $!";
_pandoc_postprocess($output);
}
elsif ( $translator eq 'lowdown' ) {
Expand All @@ -67,7 +66,7 @@ sub _make_man {
'-M', "section:$section",
$input,
'-o', $output,
);
) == 0 or die "Failed to run lowdown: $!";
}
}

Expand All @@ -76,9 +75,11 @@ sub _make_lib_man_links {

my $header = read_file("$Bin/../include/maxminddb.h");
for my $proto ( $header =~ /^ *extern.+?(MMDB_\w+)\(/gsm ) {
open my $fh, '>', "$target/man/man3/$proto.3";
print {$fh} ".so man3/libmaxminddb.3\n";
close $fh;
open my $fh, '>', "$target/man/man3/$proto.3"
or die "Failed to open file: $!";
print {$fh} ".so man3/libmaxminddb.3\n"
or die "Failed to write to file: $!";
close $fh or die "Failed to close file: $!";
}
}

Expand All @@ -92,7 +93,7 @@ sub _pandoc_postprocess {
s/^\.IP\n\.nf/.IP "" 4\n.nf/gm;
s/(Automatically generated by Pandoc)(.+)$/$1/m;
},
$file
$file,
);
}

Expand Down
Loading