[cmake-developers] install(EXCLUDE_FROM_ALL) new feature - request for comment
Nick Lewis
nick.lewis at amag.com
Mon Feb 1 05:01:39 EST 2016
There is currently no way to exclude a component install() from a full
installation. Current workarounds using OPTIONAL do not work reliably
because they depend on previous builds and on the order of the execution of
the
build and install commands for the components and the default target
Let us take an example of a project that has some tests in a component that
need to be installed into a dedicated test package. The user expectation is
that the result could be achieved by typing the following:
make
make tests
make install
DESTDIR=/testpkgs make install-tests
However this results in test components in the default installation as well
as the testpkg
Judging by questions on the mail list, users typically try to overcome this
problem by adding the EXCLUDE_FROM_ALL keyword to the install() command but
this is currently unsupported. The patch uploaded to the issue tracker
provides support for it.
Brad has further suggested that the install(EXCLUDE_FROM_ALL) should be
implicitly set when installing components built with
add_executable/library(EXCLUDE_FROM_ALL)
I welcome your views on these ideas
https://cmake.org/Bug/view.php?id=14921
Best Regards
Nick
--
Nick Lewis
nick.lewis at amag.com
+44 1684 277137 <+441684277137>
www.amag.com
AMAG Technology, Challenge House, International Drive, Tewkesbury Business
Park, TEWKESBURY, GL20 8UQ, U.K.
--
This company is part of the G4S group of companies. This communication
contains information which may be confidential, personal and/or privileged.
It is for the exclusive use of the intended recipient(s). If you are not
the intended recipient(s), please note that any distribution, forwarding,
copying or use of this communication or the information in it is strictly
prohibited. Any personal views expressed in this e-mail are those of the
individual sender and the Company does not endorse or accept responsibility
for them. Prior to taking any action based upon this e-mail message, you
should seek appropriate confirmation of its authenticity. This message has
been checked for viruses on behalf of the Company.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160201/41c0dce7/attachment.html>
More information about the cmake-developers
mailing list