← Back to team overview

kicad-developers team mailing list archive

Re: coding style: use of #include

 

This is how it was a long time ago.  I do not recall who made the change
or why it was made.  I actually prefer using "" for local headers and <>
for system wide headers.  It makes it clear to the developer where to
look for them.  I would support a change like this but it would also
have to include removing all of the cmake include_directories()
statements that add the kicad source include paths to the include path
list.  I would also prefer before we do this we remove all of the
unnecessary headers from our source files and make sure our all of ours
headers are free from undefined dependencies per the coding policy
http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/md_Documentation_development_coding-style-policy.html#header_depends.

On 11/20/2015 6:18 PM, Cirilo Bernardo wrote:
> The source code seems to have a rather inconsistent use of #include with
> some files
> using exclusively ( #include <> ) which of course requires the -I list,
> and others also
> use ( #include "" ) in a seemingly random manner. Since #include "" will
> search the
> current source directory before resorting to the -I list and then the
> system directories,
> it seems to me that this form should be preferred for all kicad headers
> and would avoid
> the use of -I to specify paths to headers which do not need to be
> exposed to the rest
> of the project.  I checked the coding policy but couldn't find any
> comments on this;
> should we have a coding policy on this?
> 
> - Cirilo
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



References