Notes |
|
(0035899)
|
Brad King
|
2014-05-19 09:29
|
|
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. |
|
|
(0039154)
|
Nick Lewis
|
2015-07-16 12:22
|
|
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 |
|
|
(0039156)
|
Brad King
|
2015-07-17 09:49
|
|
|
|
(0040353)
|
Nick Lewis
|
2016-01-29 03:46
|
|
correction2_cmake_3_4_2_install_exclude.patch is the correct patch for cmake 3.4.2 - please ignore cmake_3_4_2_install_exclude.patch and correction_cmake_3_4_2_install_exclude.patch (or delete them) |
|
|
(0040356)
|
Brad King
|
2016-01-29 08:44
|
|
Re 0014921:0040353: Thanks for updating the patch again, but please see 0014921:0039156. Also, the test suite will need to be updated to cover the feature. |
|
|
(0040359)
|
Nick Lewis
|
2016-01-29 09:46
|
|
Re 0014921:0039156 - The proposal was put on the cmake-developers mailing list as follows:
MIME-Version: 1.0
Received: by 10.140.102.239 with HTTP; Mon, 20 Jul 2015 00:36:10 -0700 (PDT)
In-Reply-To: <moe4e0$oh2$1@ger.gmane.org>
References: <CAKtwun52wXV5Gc65vqk7wDtBH06+5F3HLsERT+dD3u5pi=UaiQ@mail.gmail.com>
<moe4e0$oh2$1@ger.gmane.org>
Date: Mon, 20 Jul 2015 08:36:10 +0100
Delivered-To: nick.lewis@usa.g4s.com
Message-ID: <CAKtwun6jhOH_6Wy=CeDgoEjZCXCkFnmedjgtWsAU6-hNAmNQnQ@mail.gmail.com>
Subject: Re: [cmake-developers] install(EXCLUDE_FROM_ALL) new feature -
request for comment
From: Nick Lewis <nick.lewis@usa.g4s.com>
To: Stephen Kelly <steveire@gmail.com>
Content-Type: multipart/alternative; boundary=94eb2c05fdb0725fbb051b49970f
--94eb2c05fdb0725fbb051b49970f
Content-Type: text/plain; charset=UTF-8
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
Best Regards
Nick |
|
|
(0040360)
|
Brad King
|
2016-01-29 09:55
|
|
|
|
(0040361)
|
Brad King
|
2016-01-29 09:57
|
|
Re 0014921:0040360: Actually, your message posted in 0014921:0040359 was addressed privately to Stephen Kelly and never made it to the list.
Anyway, I think the patch is a good start. Please revise it to update the test suite to cover the feature and then start a new thread on the list with the proposal text and patch together. Thanks! |
|
|
(0040435)
|
Brad King
|
2016-02-03 14:32
|
|
|
|
(0040463)
|
Brad King
|
2016-02-10 11:23
|
|
|
|
(0041258)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|