[Opm] Version information?
Andreas Lauser
and at poware.org
Tue Nov 15 23:21:26 UTC 2016
Hi,
On Montag, 14. November 2016 23:55:22 CET Roland Kaufmann wrote:
> On 19. Oct. 2016 at 10:45, Bernd Flemisch wrote:
> On 14. Nov. 2016 at 17:19, Andreas Lauser wrote:
> > include "opm/$MODULE/version.hpp"... but as far as I know, the
> > build system currently does not generate these headers
>
> There was such a file opm/core/version.h, but it was removed with
> commit 7df248 in pull request 912.
I'm in favour of bringing it back. This time, I propose to add such a file for
all OPM modules and auto-generate them from dune.module and git by the build
system. the only potentially problematic issue I can see with this is that
these auto-generated headers must be installed, but that is already done by
opm-parser.
> An alternative way is to probe for the functionality needed, and
> have the build system put this into *your* config.h
>
> CHECK_CXX_SOURCE_COMPILES("
> #include <opm/core/snafu.h>
> int main (void) { Opm::Snafu snafu; return 0; }
> " HAVE_SNAFUCATION)
>
> It may also be that the find_dune_version macro in
> UseDuneVer.cmake can be used to probe for the version of OPM
> modules; I haven't tried that.
>
> If the feature you need is part of your API, for instance you need
> to return two different types, then things get ugly fast: I guess
> the best way would have to be to generate a header with a
> typedef.
I suppose that's too complicated: I definitely wouldn't want to be forced to do
this in order to use Dune and neither should external user OPM users be forced
to resort to such measures IMO.
cheers
Andreas
--
Measuring programming progress by lines of code is like measuring aircraft
building progress by weight.
-- Bill Gates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <//opm-project.org/pipermail/opm/attachments/20161116/31fabebc/attachment.sig>
More information about the Opm
mailing list