[patch] cmake add_test

Aleix aleixpol at gmail.com
Fri Aug 29 19:33:51 UTC 2008


Hi Manuel,
I'm in london these days on vacations. When I come back I'll review it ok?

Thanks,
Aleix

On Fri, Aug 29, 2008 at 7:26 PM, Manuel Breugelmans <mbr.nxi at gmail.com>wrote:

> On Thursday 28 August 2008 23:34:08 you wrote:
> > Currently some add_test do not get communicated correctly by the CMake
> > buildmanager. CMakeProjectVisitor overwrites target types if the
> 'add_test'
> > is in front the 'add_executable' for a test target. Attached a patch that
> > exposes the problem and fixes it.
> >
> > OK to commit this, Aliex/Matt?
> >
>
> Right, totally forget the above, the problem is much worse. KDevelop's
> handling of 'add_test' linked to TestTargetItem is based on the assumption
> that there is always an actual CMake target (in the form of add_executable)
> around. This assumption is wrong :( I fear it is broken by design atm.
>
> According to the CMake manual `add_test(foo foo.exe -bla -blah)' just says:
> look, foo.exe is a test executable, please execute it with said flags.
> foo.exe
> needn't be built by the project at all. Indeed I suppose it's not uncommon
> to
> have test scripts.
>
> Linking a test with a target _only_ works in the KDE4 case, where the
> 'kde4_add_unit_test' macro wraps an add_executable + add_test call for a
> QTEST_MAIN generated QTest.
>
>
> Manuel
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080829/628f7447/attachment.html>


More information about the KDevelop-devel mailing list