Commit Graph

46 Commits

Author SHA1 Message Date
Brad King e017ba046c AIX: Enable XCOFF editing to replace RPATH on installation
Avoid relinking before installation.
2021-02-03 12:26:58 -05:00
Asit Dhal ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Deniz Bahadir 38bcb5c0a3 export: Do not fail generation for separate namelink only case
Update the change from commit 64690f6df0 (export: Do not fail generation
for namelink-only case, 2020-10-09, v3.19.0-rc1~7^2) to also handle
separate namelink-only and namelink-skip calls.

Fixes: #21529
2020-12-01 07:35:17 -05:00
Deniz Bahadir 64690f6df0 export: Do not fail generation for namelink-only case 2020-10-09 22:29:22 +02:00
Robert Maynard a020787a9b ISPC: Support generation for multiple instruction sets 2020-09-04 08:37:07 -04:00
Brad King 248d0570c9 Tests: Factor out RunCMake.file-GET_RUNTIME_DEPENDENCIES test
Move the `file(GET_RUNTIME_DEPENDENCIES)` cases out of `RunCMake.install`.
2020-06-16 11:17:55 -04:00
Brad King 1c97a3c442 Tests: Fix RunCMake.install LDFLAGS treatment
In commit d806bd2e8c (Tests: Update test suite to run in an Anaconda
environment, 2020-03-30) an extra `}` was left in the value of the
modified `LDFLAGS`.  Remove it.  While at it, simplify the code.
2020-05-26 09:18:52 -04:00
Robert Maynard d806bd2e8c Tests: Update test suite to run in an Anaconda environment 2020-05-21 11:31:23 -04:00
Robert Maynard f867423aa2 file: GetRuntimeDependencies use CMAKE_OBJDUMP when applicable
On machines where the gnu bin utils are prefixed, or suffixed
the file(GET_RUNTIME_DEPENDENCIES ) command would fail without
explicitly setting the location of objdump.

Now we pre-populate the variables used to find objdump based
on the gnu bin utils, so that these use cases are better supported
2020-04-06 12:12:14 -04:00
Kyle Edwards 162e8aeb9e Tests: Disable test on problematic versions of install_name_tool
According to https://cmake.org/pipermail/cmake-developers/2015-September/026462.html,
there is a bug in Xcode 7.0's install_name_tool that manifests when we
try to test file(GET_RUNTIME_DEPENDENCIES). Add a cache option to disable
this test.
2020-01-27 09:52:54 -05:00
Dennis Klein 4caefbb423 cmInstallTargetGenerator: Add tests for the RPATH_CHANGE rule 2019-06-13 16:41:11 +02:00
Kyle Edwards 1f9ef25130 file: Add GET_RUNTIME_DEPENDENCIES mode
Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
2019-06-10 14:35:28 -04:00
Brad King 47389c5641 install: Do not crash on imported global target
Since commit e89ad0f94e (install: Allow installing targets created in
another directory, 2018-06-18, v3.13.0-rc1~407^2) the `install(TARGETS)`
command may find a global-scoped target outside the calling directory.
Ignore an `IMPORTED GLOBAL` target if it is found in this way.  Imported
targets cannot be installed, and trying to do so violates internal
invariants.

Fixes: #19022
2019-03-07 09:00:56 -05:00
Jon Chronopoulos 25cae1e85d install: Teach CODE,SCRIPT modes to evaluate generator expressions
This also introduces CMP0087 which will keep the OLD behaviour of not
evaluating generator expressions

Fixes: #15785
2018-12-23 09:03:38 +11:00
Kyle Edwards 9fc20a4f3e install: Add sane set of defaults for DESTINATION and file type parameters
If the user does not specify a DESTINATION for a target type, the
install() command checks to see if the appropriate variable from
GNUInstallDirs is set. If it is not, then it uses an appropriate
hard-coded guess.

In addition, for FILES and DIRECTORY, the user can specify a file
type instead of a DESTINATION, and the command will use the
appropriate variable from GNUInstallDirs, or a hard-coded guess if
it is not set.
2018-11-07 14:08:48 -05:00
Brad King 0f48fbaa72 install: Revert CODE,SCRIPT support for generator expressions
Revert commit v3.13.0-rc1~441^2 (install: Teach CODE,SCRIPT modes to
evaluate generator expressions, 2018-05-29).  Unfortunately it has
been found to break existing code in a real project, e.g.

    install(CODE [[
        message("$<FOOBAR>")
    ]])

Address this regression by reverting support for the 3.13 release
series.  Support can be restored later with a policy for compatibility.

Issue: #15785
Fixes: #18435
2018-10-11 07:05:55 -04:00
Kyle Edwards 11ca374b28 Tests: Add test for install(SCRIPT ... COMPONENT) 2018-07-17 09:07:10 -04:00
Kyle Edwards 2201fb6f43 Tests: Add test for InstallRequiredSystemLibraries 2018-07-17 09:07:10 -04:00
Kyle Edwards 69ca768e78 Tests: Add test for install(TARGETS) RPATH functionality 2018-07-17 09:07:01 -04:00
Kyle Edwards 25c3fb6c35 Tests: Add test for install(FILES) with PERMISSIONS 2018-07-17 09:07:01 -04:00
Kyle Edwards b5df4faa20 Tests: Add test for installing parts of targets in different directories 2018-07-17 09:07:01 -04:00
Kyle Edwards 4108ab4be2 Tests: Add test for install(DIRECTORY) with PATTERN and REGEX 2018-07-17 09:07:01 -04:00
Kyle Edwards bce8fa229a Tests: Add test for CONFIGURATIONS parameter of install() 2018-07-17 09:07:01 -04:00
Kyle Edwards ae1c917f1a Tests: Add test for install(<SCRIPT|CODE>) 2018-07-17 09:07:01 -04:00
Kyle Edwards 2c62a45a5a Tests: Add test for <PRE|POST>_INSTALL_SCRIPT 2018-07-17 09:07:01 -04:00
Kyle Edwards db4bc2fa18 Tests: Add test for deprecated install_*() commands 2018-07-17 09:07:01 -04:00
Kyle Edwards ec5c838fcb Tests: Add tests for *OUTPUT_NAME properties 2018-07-17 09:07:00 -04:00
Kyle Edwards f6c7358c2a Tests: Add test for install(DIRECTORY ... OPTIONAL) 2018-07-17 09:07:00 -04:00
Kyle Edwards 1638ffa287 Tests: Add tests for install(<TARGETS|FILES> ... OPTIONAL) 2018-07-17 09:07:00 -04:00
Zack Galbreath e89ad0f94e install: Allow installing targets created in another directory
Previously, `install(TARGETS)` would only accept targets created in the same
directory scope.  Relax this restriction by searching the global scope when
determining whether or not a target exists.

Fixes: #14444
2018-06-18 13:18:54 -04:00
Jon Chronopoulos 6dad812143 install: Teach CODE,SCRIPT modes to evaluate generator expressions
Fixes: #15785
2018-06-07 13:18:23 -04:00
Kyle Edwards edcb545a24 install: add test for new NAMELINK_COMPONENT parameter 2018-05-03 08:08:42 -04:00
Brad King f4c23ee244 Tests: Add case for install(FILES) with TARGET_OBJECTS 2017-04-26 16:23:12 -04:00
Brad King d272c4d5f7 Tests: Generalize RunCMake.install internal infrastructure
Allow `run_install_test` to be used for simpler cases.
2017-04-26 16:16:04 -04:00
Brad King 3b8c0fbfd7 Merge topic 'install-EXCLUDE_FROM_ALL'
586e56d0 Help: Add notes for topic 'install-EXCLUDE_FROM_ALL'
d321c196 Tests: Add cases for install() command EXCLUDE_FROM_ALL option
18ce97c4 install: Add EXCLUDE_FROM_ALL option (#14921)
2016-02-09 10:10:15 -05:00
Brad King 47460f3e15 install(EXPORT): Fix crash on target in another directory
Refactoring merged by commit v3.5.0-rc1~299 (Merge topic
'use-generator-target', 2015-10-20) in and around
commit v3.5.0-rc1~299^2~13 (cmExportSet: Store a cmGeneratorTarget,
2015-10-17) changed export sets to delay looking up actual targets and
stores only their names.  However, in InstallCommand::HandleExportMode
we need to lookup targets immediately to check them for
EXPORT_LINK_INTERFACE_LIBRARIES.  The check was accidentally made local
to the current directory, so if an export set contains a target from
another directory the lookup fails and CMake crashes.  Fix the check to
look up the target name globally, and tolerate when no target is found
just in case.

Reported-by: Kelly Thompson <kgt@lanl.gov>
2016-02-05 09:45:16 -05:00
Brad King d321c196a0 Tests: Add cases for install() command EXCLUDE_FROM_ALL option 2016-02-04 09:47:57 -05:00
Yves Frederix 630c8aa843 install: Allow generator expressions in DIRECTORY
Teach install(DIRECTORY) to support generator expressions in the list
of directories, much like install(FILES) already supports.
2016-01-13 09:02:06 -05:00
Robert Goulet bd189cc24e install: Allow generator expressions in DIRECTORY DESTINATION 2015-09-24 09:13:03 -04:00
Brad King 69ab5f5502 Tests: Cover install(FILES) with a genex DESTINATION 2015-09-23 14:41:52 -04:00
Stephen Kelly b85d3b66c6 install: Disallow installing export() result. 2015-05-14 21:38:29 +02:00
Brad King f30022eb07 install: Allow generator expressions in TARGETS DESTINATION (#14317)
This will allow per-config destinations for targets in EXPORT sets.
Using multiple install(TARGETS) with separate CONFIGURATIONS is
rejected as a target appearing more than once in an export set.
Now instead one can write

 install(TARGETS foo EXPORT exp DESTINATION lib/$<CONFIG>)

to get a single logical membership of the target in the export set
while still having a per-config destination.
2015-02-11 15:15:33 -05:00
Brad King d19b64d671 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)
Installing large directories, e.g., the output of a doxygen run, prints
one line per file resulting in too much noise in the build output.  Add
an option to the install(DIRECTORY) command to not print anything upon
make install.

Extend the RunCMake.install test with cases covering MESSAGE_NEVER
behavior of the install(DIRECTORY) command.

Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
2014-06-24 13:18:20 -04:00
Brad King c9568de52c install: Add CMAKE_INSTALL_MESSAGE variable (#13761)
Create a variable to allow users to control which installation
messages are printed.  In particular, provide a "LAZY" setting
that prints "Installing" messages but not "Up-to-date" messages.
This is desirable for incremental re-installations.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-06-24 13:18:20 -04:00
Brad King 464567a577 file(INSTALL): Report existing DIRECTORY as Up-to-date
Teach cmFileCopier::InstallDirectory to detect whether the destination
directory exists.  If so, report it as "Up-to-date" instead of
"Installing".  This resolves message asymmetry with file installations.

Extend the RunCMake.file and RunCMake.install tests to check the
installation output on both the first and second run.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-06-24 12:52:11 -04:00
Nils Gladitz be0458c562 InstallRules: added new variable to disable generation of install rules
The boolean variable CMAKE_SKIP_INSTALL_RULES
allows disabling generation of install rules for projects which don't
want them.
2014-01-08 16:28:14 +01:00