Installed tests

Thiago Macieira thiago at kde.org
Tue Jun 19 17:20:24 CEST 2007


Andreas Pakulat said:
> 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

You'll need two things:

1) to tell CMake not to build the dependency by default and to not install
it by default. I think this is the EXCLUDE_FROM_ALL tag.

2) to tell CMake to install the file if the automated test is going to
run. With unsermake, all you had to do was to add a dependency on the
target file (i.e., the file path after installing). I have no idea if
there's a CMake-provided way of doing that.

But you can "hack" your way through by creating a dependency on a target
that copies the file to the destination. Also EXCLUDE_FROM_ALL.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358




More information about the Kde-buildsystem mailing list