[cmake-developers] install(EXCLUDE_FROM_ALL) new feature - request for comment

Nick Lewis nick.lewis at usa.g4s.com
Fri Jul 17 10:06:05 EDT 2015


>>>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 execution of the build
and
>>>install commands for the components and the default target

>>>Steps to Reproduce:
>>>make
>>>make tests
>>>make install
>>>DESTDIR=/testpkgs make install-tests

>>>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 unsupported EXCLUDE_FROM_ALL keyword to the install
>>>command

 >>> http://www.cmake.org/Bug/view.php?id=14921

>>Interesting proposal.  I think a change along these lines could also
improve a
>>case mentioned in the install() command documentation:

>> http://www.cmake.org/cmake/help/v3.0/command/install.html
>> "Installing a target with the EXCLUDE_FROM_ALL target property set to
TRUE has
>>undefined behavior."

>>That refers to the use case when a target build is EXCLUDE_FROM_ALL and
so is
>>not created by "make" and may then be missing when "make install" is
issued.
>>This looks intended to support the same use case by making the install
rule
>>excluded from the default installation too.  Perhaps install(TARGETS)
should
>>activate ExcludeFromAll when the corresponding property is set on the
target.


>Rebased patch on 3.2.2. Still no automatic setting of
install(EXCLUDE_FROM_ALL)
>based on the setting of add_executable(EXCLUDE_FROM_ALL) though

Thanks for working on this.  I think it will be better discussed on the
cmake-developers mailing list:

 http://www.cmake.org/mailman/listinfo/cmake-developers

That allows for design discussion with a broader audience than the issue

-- 



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/20150717/9c651830/attachment.html>


More information about the cmake-developers mailing list