<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hey,<br>
Since i kind of came up with this whole discussion, i just want to
share my thoughts again.<br>
First, i think, this <a
href="http://stackoverflow.com/questions/28637542/ensure-config-h-is-included-once/28637797#28637797">http://stackoverflow.com/questions/28637542/</a>
is a pretty good post about the issue. Second, I will just copy
paste what i think should be kept in mind:<br>
<ol>
<li>Ususally config.h is only required for building the library
and will not be exposed to the user (i.e. will not be
installed). That requires that the library interface does not
depend on the config.h file. This implies, that usage of
#defines from the config.h files may only occur within the
libraries compiled .cpp files. <br>
</li>
<li>Heavy use of template tends to result in code moved from
.cpp to .hpp files. Hennce, in DUNE, lots of the interface
itself depends on the variables set during configuration
stage. <br>
</li>
</ol>
As pointed out in the SO post, there seems to be no proper
solution for #2. As mentioned, Eigen3 solves it by putting e.g.
its own version information into a header file which ships with
the installation and is included by other header files from the
library.<br>
From the library user point, Ansgars proposal seems to be the
correct way. There, each module can have its own defines of type
#2 (DUNE_B_HAVE_MPI) and those can ship in a header file which
can be included by other headers from the library without "messing
up the global define namespace".<br>
<br>
HtH Martin<br>
<br>
</div>
<br>
</body>
</html>