Skip to content

Commit fff8dae

Browse files
authored
Merge pull request #360 from maxmind/greg/fix-warnings
Fix CMake build warnings
2 parents cab57f3 + 3a0ab7e commit fff8dae

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.9)
1+
cmake_minimum_required (VERSION 3.9...3.30)
22

33
project(maxminddb
44
LANGUAGES C

Changes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
certain errors occurred. Pull request by pkillarjun. GitHub #356.
88
* There is now a build target to fuzz the library. Pull request by
99
pkillarjun. GitHub #357.
10+
* Updated `cmake_minimum_required` to a version range to quiet deprecation
11+
warnings on new CMake versions. Reported by gmou3. GitHub #359.
12+
* The script for generating man pages no longer uses `autodie`. This
13+
eliminates the dependency on `IPC::System::Simple`. Reported by gmou3.
14+
GitHub #359.
1015

1116
## 1.11.0 - 2024-08-21
1217

dev-bin/make-man-pages.pl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use strict;
44
use warnings;
5-
use autodie qw( :all );
65

76
use FindBin qw( $Bin );
87

@@ -54,7 +53,7 @@ sub _make_man {
5453
'-M', "section:$section",
5554
$input,
5655
'-o', $output,
57-
);
56+
) == 0 or die "Failed to run pandoc: $!";
5857
_pandoc_postprocess($output);
5958
}
6059
elsif ( $translator eq 'lowdown' ) {
@@ -67,7 +66,7 @@ sub _make_man {
6766
'-M', "section:$section",
6867
$input,
6968
'-o', $output,
70-
);
69+
) == 0 or die "Failed to run lowdown: $!";
7170
}
7271
}
7372

@@ -76,9 +75,11 @@ sub _make_lib_man_links {
7675

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

@@ -92,7 +93,7 @@ sub _pandoc_postprocess {
9293
s/^\.IP\n\.nf/.IP "" 4\n.nf/gm;
9394
s/(Automatically generated by Pandoc)(.+)$/$1/m;
9495
},
95-
$file
96+
$file,
9697
);
9798
}
9899

0 commit comments

Comments
 (0)