[gmx-developers] C++ decisions - header file extension - use of bool

David van der Spoel spoel at xray.bmc.uu.se
Mon Mar 18 22:16:28 CET 2013


On 2013-03-18 20:40, Teemu Murtola wrote:
> Hi,
>
> On Fri, Mar 15, 2013 at 4:56 PM, David van der Spoel
> <spoel at xray.bmc.uu.se <mailto:spoel at xray.bmc.uu.se>> wrote:
>
>     All C header files that can in principle be included by C++ code
>     need to have the extern "C" included. I guess we need a strict 1:1
>     correspondence language wise (i.e. .c file with .h header and .cpp
>     file with .hpp header) and .cpp files can include .h files (which
>     therefore need to be adapted), but .c files can not include .hpp files.
>
>
> This probably needs to be relaxed a bit: for the foreseeable future, we
> will probably need some files where the implementation is (partly) C++,
> but the interface is callable from C. Right now, e.g., statutil.cpp/.h
> are such a pair.
>
>     I'm ready to do the renaming if we agree.
>
>
> As I said earlier, I don't care that much about the extension, so if you
> manage to reach a consensus on what to do (or are happy with "silent
> approval"), I won't object. Just note that #include statements are not
> the only thing that are affected by the rename, so some care is needed.
> At least the following come to mind:
>
>   * Include guards are derived from the name of the header, and would be
>     best renamed for consistency.
>   * Build system contains references to the headers (e.g., listing
>     installed headers).
>   * Doxygen documentation may reference headers by file name, and this
>     may silently break if the referenced header gets renamed.
>   * Several scripts may have dependencies/references on the extensions:
>     at least admin/includedeps.* and
>     src/gromacs/selection/regenerate_parser.sh (and the .y, .l files).
>
> Teemu
>
>
Thanks for thinking this through. I guess it may not be worth the effort 
then. I don't understand the doxygen comment though, I thought it picked 
up all files on its way.

-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se



More information about the gromacs.org_gmx-developers mailing list