Hello Gerrit,
Gerrit Voß wrote:
> On Thu, 2009-05-07 at 12:04 -0500, Carsten Neumann wrote:
>> Carsten Neumann wrote:
>>> Carsten Neumann wrote:
>>>> just wanted to let everybody know that I've seen a build problem with
>>>> cmake 2.6.4. It seems that ADD_SUBDIRECTORY can not be called with the
>>>> same argument more than once in that version (which breaks our
>>>> multi-pass approach :( ).
>>>> I've not looked into this in detail, the above is more a guess than a
>>>> proper analysis, so if anybody has some insight into this (e.g. is this
>>>> a deliberate change?) I'd appreciate your input.
>>>> For the time being I recommend not to upgrade beyond cmake 2.6.3, I'll
>>>> see if I can find a workaround.
>>> I've asked the cmake list about this, for the curious:
>>>
>>> <http://www.cmake.org/pipermail/cmake/2009-May/029237.html>
>> hm, the official verdict is that you can not call ADD_SUBDIR() multiple
>> times with the same argument and it can actually break the generated
>> build system. That is why 2.6.4 now checks and forbids it.
>> I changed our build to only use two passes (OSGPASS_COLLECT and
>> OSGPASS_BUILD) one to pick up dependencies and then issue build commands
>> for the libs, tests and unittest in the second.
>> A downside of this is that the libs are built with more -I options than
>> necessary (the INCLUDE_DIRECTORIES() command only has directory scope in
>> cmake :-/), not nice, but I'm not sure if it worked
>> correctly/differently before.
>
> can we please back out of this at least partially. Having all test
> dependencies in the lib build is what I explicitly made sure does not
> happen.
ok, and sorry for removing the external stuff, that was an accident. I'm
reverting the change and try to come up with something else.
> Otherwise making sure the libs are consistent is difficult because
> things get easily included where it should not happen because it creates
> cyclic lib dependencies.
yes, I know, but since INCLUDE_DIRS() has directory scope I did not see
a straightforward way to have different settings for a lib and its
tests :-/
> It also forces far to big rebuilds as instead of just rebuilding tests
> now a lot more libs will be rebuild because the test dependencies are
> taken into account for the lib build too.
I'm not sure I understand this part. It has always been the case that if
you do a 'make testFoo' it checked if the libs testFoo depends on are
up-to-date. What other libs are now rebuilt?
> Where the test/doc/unittest passes really a the problem even with 2.6.4,
> if not why did they got merged in the first place ?.
the problem with 2.6.4 is that we visit the directories that contain
CMakeLists.Lib.*.txt files in each pass by calling ADD_SUBDIRECTORY(),
and multiple calls to ADD_SUBDIR() with the same argument now produce an
error (according to the cmake ML this only worked by accident before,
since it rewrites files on each call, and now is simply diagnosed [1]).
Now, the big advantage of ADD_SUBDIR() over INCLUDE() was that it
created a new scope for stuff like INCLUDE_DIRS(), so that we could have
different settings for libs and tests.
One thing we could do is move the tests to a /Test directory below the
one they currently live in. Other ideas?
Cheers,
Carsten
[1] one glitch where this became apparent is the fact that unittest run
3 times each when calling 'make test' prior to my changes.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users