mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
`include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 13. Some patterns: * Types named in virtual `override` signatures no longer require includes since the overridden signature already names them. * A function argument's type needs to be included even if its constructor is called only by implicit conversion. For example, constructing a `std::function` from a lambda now requires `<functional>`. * Some prior mysterious `<type_traits>` inclusions are no longer required.
78 lines
4.4 KiB
TOML
78 lines
4.4 KiB
TOML
[
|
|
# https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md
|
|
|
|
# C++ alternatives to C standard headers
|
|
{ include: [ "<assert.h>", public, "<cassert>", public ] },
|
|
{ include: [ "<complex.h>", public, "<ccomplex>", public ] },
|
|
{ include: [ "<ctype.h>", public, "<cctype>", public ] },
|
|
{ include: [ "<errno.h>", public, "<cerrno>", public ] },
|
|
{ include: [ "<float.h>", public, "<cfloat>", public ] },
|
|
{ include: [ "<iso646.h>", public, "<ciso646>", public ] },
|
|
{ include: [ "<limits.h>", public, "<climits>", public ] },
|
|
{ include: [ "<locale.h>", public, "<clocale>", public ] },
|
|
{ include: [ "<math.h>", public, "<cmath>", public ] },
|
|
{ include: [ "<setjmp.h>", public, "<csetjmp>", public ] },
|
|
{ include: [ "<signal.h>", public, "<csignal>", public ] },
|
|
{ include: [ "<stdarg.h>", public, "<cstdarg>", public ] },
|
|
{ include: [ "<stddef.h>", public, "<cstddef>", public ] },
|
|
{ include: [ "<stdio.h>", public, "<cstdio>", public ] },
|
|
{ include: [ "<stdlib.h>", public, "<cstdlib>", public ] },
|
|
{ include: [ "<string.h>", public, "<cstring>", public ] },
|
|
{ include: [ "<time.h>", public, "<ctime>", public ] },
|
|
{ include: [ "<wchar.h>", public, "<cwchar>", public ] },
|
|
{ include: [ "<wctype.h>", public, "<cwctype>", public ] },
|
|
|
|
# HACK: check whether this can be removed with next iwyu release.
|
|
{ include: [ "<bits/c++config.h>", private, "<cstddef>", public ] },
|
|
{ include: [ "<bits/types/mbstate_t.h>", private, "<wchar.h>", public ] },
|
|
|
|
# HACK: check whether this can be removed with next iwyu release.
|
|
{ symbol: [ "__GLIBC__", private, "<stdlib.h>", public ] },
|
|
{ symbol: [ "std::pair", private, "<utility>", public ] },
|
|
|
|
# Wrappers for 3rd-party libraries
|
|
{ include: [ "@<.*curl/curlver.h>", private, "<cm3p/curl/curl.h>", public ] },
|
|
{ include: [ "@<.*curl/system.h>", private, "<cm3p/curl/curl.h>", public ] },
|
|
{ include: [ "@<.*json/config.h>", private, "<cm3p/json/value.h>", public ] },
|
|
{ include: [ "@<.*json/forwards.h>", private, "<cm3p/json/value.h>", public ] },
|
|
{ include: [ "@<.*uv/.+\\.h>", private, "<cm3p/uv.h>", public ] },
|
|
{ include: [ "@<.*expat_external.h>", private, "<cm3p/expat.h>", public ] },
|
|
{ include: [ "@<.*zconf.h>", private, "<cm3p/zlib.h>", public ] },
|
|
{ include: [ "@<.*cm_zlib_mangle.h>", private, "<cm3p/zlib.h>", public ] },
|
|
{ include: [ "<cmllpkgc/llpkgc__internal.h>", public, "<cmllpkgc/llpkgc.h>", public ] },
|
|
|
|
{ symbol: [ "std::ifstream", private, "\"cmsys/FStream.hxx\"", public ] },
|
|
{ symbol: [ "std::ofstream", private, "\"cmsys/FStream.hxx\"", public ] },
|
|
{ symbol: [ "cmsys::ifstream", private, "\"cmsys/FStream.hxx\"", public ] },
|
|
{ symbol: [ "cmsys::ofstream", private, "\"cmsys/FStream.hxx\"", public ] },
|
|
|
|
{ include: [ "<istream>", public, "\"cmsys/FStream.hxx\"", public ] },
|
|
{ include: [ "<ostream>", public, "\"cmsys/FStream.hxx\"", public ] },
|
|
{ include: [ "<fstream>", public, "\"cmsys/FStream.hxx\"", public ] },
|
|
|
|
{ symbol: [ "mode_t", private, "\"cm_sys_stat.h\"", public ] },
|
|
{ symbol: [ "S_IWUSR", private, "\"cm_sys_stat.h\"", public ] },
|
|
{ symbol: [ "S_IWGRP", private, "\"cm_sys_stat.h\"", public ] },
|
|
|
|
{ include: [ "<filesystem>", public, "<cm/filesystem>", public ] },
|
|
{ include: [ "<optional>", public, "<cm/optional>", public ] },
|
|
{ include: [ "<shared_mutex>", public, "<cm/shared_mutex>", public ] },
|
|
{ include: [ "<string_view>", public, "<cm/string_view>", public ] },
|
|
|
|
# major and minor are used as macro arguments. Those are false matches.
|
|
{ symbol: [ "major", private, "\"cmVersion.h\"", public ] },
|
|
{ symbol: [ "minor", private, "\"cmVersion.h\"", public ] },
|
|
|
|
{ include: [ "<ncurses.h>", private, "\"cmCursesStandardIncludes.h\"", public ] },
|
|
{ include: [ "\"form.h\"", private, "\"cmCursesStandardIncludes.h\"", public ] },
|
|
|
|
# Help IWYU understand our explicit instantiation for cmStack.
|
|
{ symbol: [ "cmStack::cmStack<T, Stack, Mutable>", private, "\"cmStack.h\"", public ] },
|
|
{ symbol: [ "cmStack<cmFindPackageCall, cmFindPackageStack>::Empty", private, "\"cmStack.h\"", public ] },
|
|
{ symbol: [ "cmStack<cmFindPackageCall, cmFindPackageStack>::Top", private, "\"cmStack.h\"", public ] },
|
|
{ symbol: [ "cmStack<cmFindPackageCall, cmFindPackageStack>::Pop", private, "\"cmStack.h\"", public ] },
|
|
{ symbol: [ "cmStack<cmFindPackageCall, cmFindPackageStack>::Push", private, "\"cmStack.h\"", public ] },
|
|
]
|
|
|
|
# vim: set ft=toml:
|