[odb-users] ODB compiler does not check up-to-date

Boris Kolpackov boris at codesynthesis.com
Mon Jan 28 08:09:02 EST 2013

Hi Almog,

Almog Cohen <almogco at gmail.com> writes:

> it seems that when using VS2010 -> Custom build scripts for compiling
> using the ODB compiler, the compiler does not check if the files are
> up-to-date before compiling and just builds them all. this significantly
> extends build time in big projects.

Hm, this is strange. We don't observe this behavior in our examples
and tests. To verify, I tried the following steps:

1. Open the examples solution found in the odb-examples package.

2. Build the 'hello' example. Since this is the clean build, as
   expected, everything is compiled (i.e., the ODB compiler is
   invoked on hello.hxx, etc).

3. Build the example again. This time, again as expected, nothing
   is compiled (i.e., no ODB compiler execution) and VC++ simply
   says that everything is up-to-date.

4. Modify hello.hxx and build the example again. This time, again
   as expected, ODB compiler is invoked on hello.hxx.

So for me everything works as expected. Can you try the examples
and see if it works for you?

Note also that it is not the ODB compiler that checks whether
everything is up to date. Rather, it is the VC++ IDE. And the
way it decides whether it needs to run the custom build step
is by comparing the modification dates of the files mentioned
in the "Outputs" fields of the Custom Build dialog to that of
the header file.

So if you do not specify the correct output files, you will most
likely get constant rebuilds. Specifically, for the hello.hxx
header this field should contain (provided you haven't changed
the file suffixes):


That is, the generated file names are separated with the


More information about the odb-users mailing list