From e9ac86dc7f57a41f6a4e63e6f48d1b4b7f3d1eb9 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Sun, 24 Mar 2024 17:41:34 +0100 Subject: [PATCH] Use C++17 for TagLib 2.0 --- ext/extconf_common.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/extconf_common.rb b/ext/extconf_common.rb index 15f63d0..bcab16e 100644 --- a/ext/extconf_common.rb +++ b/ext/extconf_common.rb @@ -46,5 +46,10 @@ def error(msg) $CFLAGS << ' -DSWIG_TYPE_TABLE=taglib' +# TagLib 2.0 requires C++17. Some compilers default to an older standard +# so we add this '-std=' option to make sure the compiler accepts C++17 +# code. +$CXXFLAGS << ' -std=c++17' + # Allow users to override the Ruby runtime's preferred CXX RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['TAGLIB_RUBY_CXX'] if ENV['TAGLIB_RUBY_CXX']