target url from the project manager
M Breugelmans
mbr.nxi at gmail.com
Fri Oct 17 08:17:55 UTC 2008
On Fri, Oct 17, 2008 at 4:38 AM, Matt Rogers <mattr at kde.org> wrote:
> On Thursday 16 October 2008 15:56:06 Matt Rogers wrote:
>> On Thursday 16 October 2008 04:12:47 M Breugelmans wrote:
>> > On Wed, Oct 15, 2008 at 4:36 AM, Aleix <aleixpol at gmail.com> wrote:
>> > > hi list,
>> > > this was discussed some time ago but we didn't find anything good but
>> > > we didn't come up with a good interface for that. Now it is needed for
>> > > the new runcontroller, we want to be able to run any target.
>> > >
>> > > This is being solved in cmake adding the url to the UserData+1 (it is
>> > > already possible to run a target from the projectmodelview if it is
>> > > cmake), we need a way to specify it in the platform interface.
>> > >
>> > > Last time we spoke about many things, returning: KUrl, KUrl::List,
>> > > QMap<QString, KUrl> iirc. What do you think?
>> >
>> > The last one definitely not. IF that kind of information needs to be
>> > available it's better to hide it behind an interface/class of its own.
>> >
>> > > Maybe we can add it only to test and executable target items
>> >
>> > Test-target items are a KDE only thing (as discussed a little on this
>> > list before). That should be removed from the api, at least if
>> > kdevelop aims to support cmake instead of kde-cmake :)
>> >
>> > enable_testing()
>> > add_executable(foo foo.cpp)
>> > add_test(foo echo "test 123")
>> >
>> > This is legal cmake, but the 'foo' in the add_executable line is in no
>> > way related to 'foo' in the add_test line. So it is wrong to translate
>> > this to a TestTarget 'foo' with associated url
>> > <cmake-executable-dir>/foo. Only the kde4_add_unit_test macro links
>> > these two.
>>
>> So? if it's not a URL, then an executable test target is not created for
>> it. Right now, I have a project that uses CMake, but the QTest runner
>> doesn't work because I use the exact same construct above, with the second
>> parameter being a URL, just to provide an real world use case, rather than
>> your convoluted one. Honestly, who's going to do: add_test( foo echo "test
>> 123")?
>>
>
> And let me be a bit more clear here: The URL in question points to a test
> executable that my project generates.
>
> One possibility is limiting the list of test executables to those that are
> actually generated by the project.
>
> However, we should just make the assumption that the user isn't going to do
> crazy things and base our API around that. We can't be everything to everyone
> and it would be wrong to even try.
>
Errrr it's not 'crazy' nor 'convoluted' at all. This is standard CTest
usage the way kitware devs intended it. This feature is put to good
use in the nightly kdevelop + kdevplatform suite, day after day after
day.
http://lists.kde.org/?l=kdevelop-devel&m=122045908618622&w=2
Manuel
More information about the KDevelop-devel
mailing list