Commit Graph

61 Commits

Author SHA1 Message Date
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
Brad King
dd8d5004a9 Merge branch 'backport-3.16-install-default-fix' 2020-02-11 14:59:21 -05:00
Kyle Edwards
9442ae5083 install: Fix regression when using default destinations
In commit 9fc20a4f3e (install: Add sane set of defaults for DESTINATION
and file type parameters, 2018-11-02, v3.14.0-rc1~410^2~1), a regression
was introduced, in which an `install(TARGETS)` with a
RUNTIME/LIBRARY/ARCHIVE DESTINATION but no PUBLIC_HEADER/PRIVATE_HEADER
DESTINATION would then install the headers.  The old behavior did not do
this.  Restore the old behavior.

Fixes: #20326
2020-02-11 08:34:16 -05: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
Kyle Edwards
c998c8d560 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the
first one.
2020-01-22 14:34:33 -05:00
Kyle Edwards
4c8a917a87 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the
first one.
2020-01-22 13:05:46 -05:00
Kyle Edwards
5a8a9f7229 Ninja: Add multi-config variant
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
2019-12-13 10:51:46 -05:00
Dennis Klein
4caefbb423 cmInstallTargetGenerator: Add tests for the RPATH_CHANGE rule 2019-06-13 16:41:11 +02:00
Dennis Klein
9e84c7c5e8 cmInstallTargetGenerator: Introduce CMP0095
Escape coincidental CMake syntax in RPATH entries when generating the
intermediary cmake_install.cmake script.

Fixes #19225
2019-06-13 16:41:04 +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
Avraham Shukron
a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties
Also support installing headers on an INTERFACE library.

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Fixes: #15234
2019-04-11 11:09:42 -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
Craig Scott
d3b765d451 EXCLUDE_FROM_ALL: Don't warn if installing target excluded from all
The original warning pre-dates support for install components.
There are now legitimate scenarios where an install(TARGETS)
command may list a target that is excluded from all, e.g.
hierarchical projects that will never install the component such a
target belongs to.

Fixes: #18938
2019-02-22 07:55:56 +11:00
Craig Scott
170fcebf2e Merge topic 'install-code-script-genex'
25cae1e85d install: Teach CODE,SCRIPT modes to evaluate generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2688
2018-12-23 17:19:57 -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
3f915531ad Tests: Fix Cygwin failure on RunCMake.install 2018-12-19 12:04:59 -05: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
fd0e40f166 Merge branch 'backport-revert-install-code-script-genex' into revert-install-code-script-genex 2018-10-11 08:14:48 -04: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
514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 2018-10-10 10:06:27 -04:00
Brad King
0c709cb2a2 Add deprecation warnings for policies CMP0063 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for some policies
to encourage projects to port away from setting policies to OLD.
2018-09-17 14:16:48 -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
Clinton Stimpson
1ba91291e3 Add policy CMP0068 separate install_name and RPATH settings on macOS
BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and
CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name
of a target on macOS.

Fixes: #16589
2017-02-14 14:28:07 -07:00
Daniel Pfeifer
7a649111cd Use string(APPEND) in Tests
Automate with:

find Tests -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:43:04 +02:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -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
a1ad098dc8 Tests: Avoid OS X 10.5 limitation warning in RunCMake.install test
The EXPORT-OldIFace test case uses install(TARGETS) and so generates a
warning:

 CMake Warning in CMakeLists.txt:
   WARNING: Target "foo" has runtime paths which cannot be changed during
   install.  To change runtime paths, OS X version 10.6 or newer is required.
   Therefore, runtime paths will not be changed when installing.
   CMAKE_BUILD_WITH_INSTALL_RPATH may be used to work around this limitation.

Set CMAKE_BUILD_WITH_INSTALL_RPATH to avoid the warning since we do not
need to run the binaries from the build tree anyway.
2016-02-08 10:44:43 -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
e86383e135 Tests: Use newer policy settings in RunCMake.install test
In particular, avoid CMP0042 warnings on OS X.
2016-02-05 09:44:26 -05:00