diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f8c6e20..c33adee4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.9) +cmake_minimum_required (VERSION 3.9...3.30) project(maxminddb LANGUAGES C diff --git a/Changes.md b/Changes.md index 10816a82..73d039fd 100644 --- a/Changes.md +++ b/Changes.md @@ -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 diff --git a/dev-bin/make-man-pages.pl b/dev-bin/make-man-pages.pl index d7c29f7b..2b6fc853 100755 --- a/dev-bin/make-man-pages.pl +++ b/dev-bin/make-man-pages.pl @@ -2,7 +2,6 @@ use strict; use warnings; -use autodie qw( :all ); use FindBin qw( $Bin ); @@ -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' ) { @@ -67,7 +66,7 @@ sub _make_man { '-M', "section:$section", $input, '-o', $output, - ); + ) == 0 or die "Failed to run lowdown: $!"; } } @@ -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: $!"; } } @@ -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, ); }