[Dune-devel] .in-file mechanism with cmake?!
dominic.r.kempf at gmail.com
Wed Jul 15 16:04:46 CEST 2015
did you try writing CMAKE_SOURCE_DIR instead of top_srcdir?
On Wed, Jul 15, 2015 at 4:00 PM, Christian Engwer <
christian.engwer at uni-muenster.de> wrote:
> Dear cmake gurus,
> I want to update an existing project to work with cmake and stumbled
> again over an issue, which I was not able to solve by myself.
> I currently have a file foo.ini.in with a content similar to:
> dim = 2
> mesh = @top_srcdir@/src/grids/rectangle.msh
> refine = 1
> which allows me specify a mesh location in the source tree easily via
> the generated ini file, even if I use out-of-source builds.
> For autotools I added the foo.ini.in to the list of generated files
> in configure.ac:
> Now I tried to do the same for cmake. I added to following to
> configure_file(foo.ini.in foo.ini)
> but configure_file doesn't know about @top_srcdir@ and similar. I fist
> would have thought tis should work, as it works for Doxyfile.in, but
> it doesn't. Then I check the DuneDoxygen.cmake and it seems that this
> does some fancy tricks with by directly calling cmake. Is this the
> official way to go? Or is there an easier way, which forks for
> "simple" .in-files? If it's not the case we should consider
> encapsulating the doxygen magic, as .in files could be something more
> people use. At least it was a nice trick I have shown a couple of
> Dune-devel mailing list
> Dune-devel at dune-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dune-devel