cpu_features icon indicating copy to clipboard operation
cpu_features copied to clipboard

Includes of gtest with < > instead of " ".

Open gruenich opened this issue 1 year ago • 4 comments

Found by Cppcheck (missingInclude).

gruenich avatar Dec 17 '24 21:12 gruenich

Can I spark your interested in this humble improvement, @gchatelet ?

gruenich avatar Feb 22 '25 10:02 gruenich

AFAIK bazel use -I and not -isystem so using <...> should break the bazel based build

Mizux avatar Feb 24 '25 07:02 Mizux

It should not matter to be included by -I or -isystem, the difference is only that the latter suppresses warnings from those includes.

The main difference is that according to POSIX qutation marks leads to a search relative to the file while the bracets searche relative to the includes (-I), see
https://stackoverflow.com/a/11576616/2799037

gruenich avatar Feb 25 '25 21:02 gruenich

Indeed it should not matter to use -I or -isystem but if we are to use <...> then we also need to move the include above the "..." includes.

https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

gchatelet avatar Feb 26 '25 10:02 gchatelet