+18
−1
+20
−0
+2
−1
+5
−0
Loading
Check headers are self contained and sort includes After looking into it, I think that IWYU is too much effort for what we get from doing it (decreased build times). However, I still think it is worth making sure each include file is self contained and if we have take, we can start sorting our includes which gives us one less thing to nit about. To check that the headers are self contained, we try to compile files containing only "#include <path/to/header>" which get generated. To find the header files, I do a `file(GLOB_RECURSE ... CONFIGURE_DEPENDS ...)`, which will re-run the glob every time we run `cmake --build` to check that a file hasn't been added. If a file has been added, then we will re-run the cmake configure. This ensures we do not miss a new header file, but does add some overhead. I have therefore hidden this all behind an (off by default) `TANGO_CHECK_HEADERS_SELF_CONTAINED` option. The debug linux preset has this enabled. For sorting, I have gone with the following groupings. If anyone cares about this strongly please speak up: ``` <main> "any in quotes" <tango/internal/...> <tango/...> <dependencies: omniORB, zmq, opentelemetry etc.> <system headers> <stdlib> ``` TODO: - [x] Check that log4tango and tests headers are also self contained - [x] Update the clang-format config to do the above properly Close #1587 See merge request !1557