<div dir="ltr"><br>>>>There is currently no way to exclude a component install() from a full<br>
>>>installation. Current workarounds using OPTIONAL do not work reliably because<br>
>>>they depend on previous builds and on the order execution of the build and<br>
>>>install commands for the components and the default target<br>
<br>
>>>Steps to Reproduce:<br>
>>>make<br>
>>>make tests<br>
>>>make install<br>
>>>DESTDIR=/testpkgs make install-tests<br>
<br>
>>>This results in test components in the default installation as well as the<br>
>>>testpkg<br>
<br>
>>>Judging by questions on the mail list, users typically try to overcome this<br>
>>>problem by adding the unsupported EXCLUDE_FROM_ALL keyword to the install<br>
>>>command<br><br> >>>
<a href="http://www.cmake.org/Bug/view.php?id=14921" rel="noreferrer" target="_blank">http://www.cmake.org/Bug/view.php?id=14921</a><br><br>
>>Interesting proposal.  I think a change along these lines could also improve a<br>
>>case mentioned in the install() command documentation:<br>
<br>
>> <a href="http://www.cmake.org/cmake/help/v3.0/command/install.html" rel="noreferrer" target="_blank">http://www.cmake.org/cmake/help/v3.0/command/install.html</a><br>
>> "Installing a target with the EXCLUDE_FROM_ALL target property set to TRUE has<br>>>undefined behavior."<br>
<br>
>>That refers to the use case when a target build is EXCLUDE_FROM_ALL and so is<br>
>>not created by "make" and may then be missing when "make install" is issued.<br>
>>This looks intended to support the same use case by making the install rule<br>
>>excluded from the default installation too.  Perhaps install(TARGETS) should<br>
>>activate ExcludeFromAll when the corresponding property is set on the target.<br>
<br>
<br>
>Rebased patch on 3.2.2. Still no automatic setting of install(EXCLUDE_FROM_ALL)<br>
>based on the setting of add_executable(EXCLUDE_FROM_ALL) though<br>
<br>
Thanks for working on this.  I think it will be better discussed on the<br>
cmake-developers mailing list:<br>
<br>
 <a href="http://www.cmake.org/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">http://www.cmake.org/mailman/listinfo/cmake-developers</a><br>
<br>
That allows for design discussion with a broader audience than the issue<br clear="all"><br></div>

<br>
<div style="color:rgb(34,34,34);font-family:verdana,sans-serif;font-size:small;background-color:rgb(255,255,255)"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br></span></div><div style="color:rgb(34,34,34);font-family:verdana,sans-serif;font-size:small;background-color:rgb(255,255,255)"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br></span></div><div style="color:rgb(34,34,34);font-family:verdana,sans-serif;font-size:small;background-color:rgb(255,255,255)"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br></span></div><div style="color:rgb(34,34,34);font-family:verdana,sans-serif;font-size:small;background-color:rgb(255,255,255)"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">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.</span></div>