Skip to content

Commit

Permalink
Fix build on mswin; -std:c++20 is required
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Nov 11, 2023
1 parent 0aca3e2 commit 6816d59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/unf_ext/extconf.rb
Expand Up @@ -6,6 +6,11 @@
have_library('stdc++')

case RbConfig::CONFIG['host_os']
when /mswin/
# Avoid `error C7555: use of designated initializers requires at least '/std:c++20'`
$CFLAGS << ' ' << '-std=c++20'
$CPPFLAGS << ' ' << '-std=c++20'
$CXXFLAGS << ' ' << '-std=c++20'
when /solaris(!?2.11)/
# Do a little trickery here to enable C++ standard on Solaris 11 if found.
# This also forces 64bit compilation mode.
Expand Down

0 comments on commit 6816d59

Please sign in to comment.