[odb-users] Includes and CMake out-of-source builds

Boris Kolpackov boris at codesynthesis.com
Mon Aug 26 08:19:25 EDT 2013


Hi Per,

Per Edin <info at peredin.com> writes:

> What do you think about this?

Short version: bad idea.

Longer version: This whole file/include/directory management is already
way more complex than what I would have liked (don't believe me, take
a look at the odb/odb.cxx file with all the gory details). Adding another
set of "soft" rules like "if there is a common directory then strip it
and re-create the remaining directories in the output-dir" will just 
complicate things even further. And, BTW, what is the logic if there
is no common directory prefix? Do we re-create the whole directory
sequence in output-dir? Or not? Maybe issue an error? Maybe add an
option that specifies what to do in this case?

And don't let me started on explaining all this convoluted logic in
the documentation.

At the same time, there is a very simple solution to this: compile
one file a time. This way you can figure out the output-dir as
you wish, make sure that it is created before running the ODB
compiler, and also add the include prefix with --include-prefix
option. Any half-decent build system should allow you to do all
that.

Boris



More information about the odb-users mailing list