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

Update CMake minimum version, silence compiler warnings #775

Merged
merged 2 commits into from
Dec 12, 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
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# 3.1 is OK for most parts. However:
# 3.3 is needed in src/libFLAC
# 3.5 is needed in src/libFLAC/ia32
# 3.9 is needed in 'doc' because of doxygen_add_docs()
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.12...3.31)

if(NOT (CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES OR DEFINED ENV{CFLAGS} OR DEFINED ENV{CXXFLAGS}))
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo")
Expand Down
2 changes: 0 additions & 2 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cmake_minimum_required(VERSION 3.9)

option(BUILD_DOXYGEN "Enable API documentation building via Doxygen if not already present" ON)

if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/api")
Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cmake_minimum_required(VERSION 3.11)

option(ENABLE_64_BIT_WORDS "Set FLAC__BYTES_PER_WORD to 8, for 64-bit machines. For 32-bit machines, turning this off might give a tiny speed improvement" ON)
option(BUILD_UTILS "Build utils" OFF)

Expand Down
2 changes: 1 addition & 1 deletion src/libFLAC/metadata_iterators.c
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ static FLAC__bool chain_rewrite_metadata_in_place_(FLAC__Metadata_Chain *chain)
static FLAC__bool chain_rewrite_file_(FLAC__Metadata_Chain *chain, const char *tempfile_path_prefix, const char *filename)
{
FILE *f, *tempfile = NULL;
char *tempfilename;
char *tempfilename = 0;
FLAC__Metadata_SimpleIteratorStatus status;
const FLAC__Metadata_Node *node;

Expand Down
2 changes: 0 additions & 2 deletions src/share/utf8/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cmake_minimum_required(VERSION 3.12)

add_library(utf8 STATIC
charset.c
iconvert.c
Expand Down
2 changes: 1 addition & 1 deletion src/test_libFLAC++/metadata_manip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static bool write_chain_(FLAC::Metadata::Chain &chain, bool use_padding, bool pr

if(to_different_file || chain.check_if_tempfile_needed(use_padding)) {
struct flac_stat_s stats;
FILE *file, *tempfile;
FILE *file, *tempfile = 0;
char *tempfilename;
if(preserve_file_stats) {
if(!get_file_stats_(filename, &stats))
Expand Down
Loading