MSVC does not like std:c++11

This commit is contained in:
Kovid Goyal 2023-01-27 15:36:49 +05:30
parent 0a95d52f9e
commit 22cea8d90a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -529,6 +529,8 @@ class Build(Command):
'-DCALIBRE_MODINIT_FUNC='
'{} __attribute__ ((visibility ("default"))) {}'.format(extern_decl, return_type)]
if ext.needs_cxx and ext.needs_cxx_std:
if env.cc_output_flag.startswith('/') and ext.needs_cxx == "11":
ext.needs_cxx = "14"
cflags.append(env.std_prefix + 'c++' + ext.needs_cxx_std)
if ext.needs_c_std and not env.std_prefix.startswith('/'):