[CMake] install() and EXCLUDE_FROM_ALL issue

Brandon Van Every bvanevery at gmail.com
Wed Aug 1 16:02:59 EDT 2007


On 8/1/07, Alexandru Ciobanu <aciobanu at matrox.com> wrote:
> Hi!
>
> Given the following simple setup:
>
>    add_subdirectory ( lib )
>    add_subdirectory ( tests EXCLUDE_FROM_ALL )
>
> When I run make it correctly builds only the lib.
>
> When I run "make install" it checks for the presence of *all* the
> targets including the ones from test/.
>
> Why is that? And is that a desired?

Not sure.

> If so, how can I separately install the lib before ( or without )
> building the tests.

Given the behavior, you would need an IF(conditional) around your
INSTALL statements for /tests.

Cheers,
Brandon Van Every


More information about the CMake mailing list