On Tuesday 19 June 2007 19:39, Andreas Pakulat wrote:
> On 19.06.07 19:08:20, Alexander Neundorf wrote:
...
> > add_executable(foo EXCLUDE_FROM_ALL main.cpp)
> > install(TARGETS foo DESTINATION bin)
> >
> > where the install failed if foo wasn't built, right ?
>
> Not really, the problem was that make started to build foo, but foo
> needed a .ui file to be processed which didn't happen because foo wasn't
> built explicitly.

"make foo" should do everything required for building foo. If it doesn't then 
there is some problem.

> > > > But this file should not be installed in a non test environment
> > > > because it add unnecessary entry in the knotify control module. So
> > > > maybe we can just disable this test, and if one want to test, one
> > > > need to install manually files
> > >
> > > Ok, so the original problem still exists: Installing certain files when
> > > building a test (or installing them with make install only if the test
> > > was built before), without having to specify -DKDE4_BUILD_TESTS. Any
> > > ideas how/if this is possible with cmake
> > >
> > > I think there may be quite some other things that are of the same form
> > > (a rc or desktop file that needs to be installed for the test to work).
> >
> > There should be no problem installing some desktop or rc files no matter
> > whether a target is built or not.
>
> Right, except that this will give packagers a headache, they have to
> explicitly deselect these file then.

Actually I think stuff needed only for testing shouldn't be installed. Would 
be cool if we could find a solution for these test apps. Maybe setting 
KDEDIRS ?

> > I have the impression that we are trying to do something with regard to
> > the tests which isn't supported by cmake/ctest and we are now trying to
> > add more and more hacks to make it behave somewhat like what we want.
> >
> > So, what do we need ?
> >
> > (please don't answer how it worked with autotools, but the features which
> > are needed)
> >
> > ctest knows the names of all tests created using ADD_TEST().
>
> this is not using add_test, because this is not a unit-test. Its just a
> target that is only built by doing make <target> or by specifying
> -DKDE4_BUILD_TESTS=on. And obviously the test needs a file to be
> installed to be executed.

Ok.

> > Would it help if ctest would build the test executables if they haven't
> > been built before it tries to run the tests ?
>
> Thats something I already brought up on the cmake lists a few weeks ago
> - IIRC. Not sure what the result was though. This is something that
> makes sense IMHO because if I ask to run a few tests I surely want to
> build them as well. And some people are crazy using ruby scripts to

Yes. With add_test() you can run any programs and use them as tests, not only 
programs built within this project.
Anyway, it should be possible to get this working.

Bye
Alex
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to