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

Almog Cohen almogco at gmail.com
Mon Jan 28 20:00:03 EST 2013


Hi Boris,

Thank you for your reply.
You are right, it was my mistake.
I modified the syntax from the example to fit any general header:
%(Filename)-odb.hxx;%(Filename)-odb.ixx;%(Filename)-odb.cxx;%(Outputs)
and i accidentally wrote %(Filename)-odb.h instead of hxx.

thanks again.

On Jan 28, 2013, at 5:09 AM, Boris Kolpackov <boris at codesynthesis.com> wrote:

> 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):
> 
> hello-odb.hxx;hello-odb.ixx;hello-odb.cxx
> 
> That is, the generated file names are separated with the
> semicolon.
> 
> Boris



More information about the odb-users mailing list