meson: Use <version> header for C++ library version check
The ciso646 header has been removed in C++20. Use the version header instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
@@ -118,10 +118,9 @@ cpp_arguments = [
|
||||
'-Wnon-virtual-dtor',
|
||||
]
|
||||
|
||||
# \todo Switch to `version` when moving to C++20 as `ciso646` has been removed in C++20.
|
||||
if cxx.has_header_symbol('ciso646', '_LIBCPP_VERSION')
|
||||
if cxx.has_header_symbol('version', '_LIBCPP_VERSION')
|
||||
cxx_stdlib = 'libc++'
|
||||
elif cxx.has_header_symbol('ciso646', '__GLIBCXX__')
|
||||
elif cxx.has_header_symbol('version', '__GLIBCXX__')
|
||||
cxx_stdlib = 'libstdc++'
|
||||
else
|
||||
error('C++ standard library cannot be detected')
|
||||
|
||||
Reference in New Issue
Block a user