Commit Graph

2192 Commits

Author SHA1 Message Date
Gabor Bencze
d7955d4e5d Tests: Create test for SKIP_REGULAR_EXPRESSION test property 2019-07-18 11:52:10 -04:00
Brad King
44a6468304 Merge topic 'aix-exe-implib'
2fa920c0cd AIX: Create import library for executables with exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3561
2019-07-17 09:16:07 -04:00
Brad King
3143e9ffc5 Merge topic 'project-version-0'
0ba5891ead project: Keep leading `0` in PROJECT_VERSION components
5f84669806 Tests: Factor out RunCMake.project helper macro into module
b1f387a7ea Refactor: Use raw string literals instead of escaping
41b85968d8 Refactor: Use initializer lists instead of `push_back` series
45e85dd2b2 Refactor: Add some `const` to vars
90f91e4d21 Refactor: Replace a "magic" number w/ a named constant
638383c38f Refactor: Eliminate one-time-used variables
9b6a53292f Refactor: Eliminate `sep` from the loop

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3517
2019-07-17 07:28:05 -04:00
Brad King
2fa920c0cd AIX: Create import library for executables with exports
On AIX, plugins meant to be loaded into executables via `dlopen` must be
linked with access to a list of symbols exported from the executable in
order to use them (when not using runtime linking).  The AIX linker
supports specifying this list as an "import file" passed on the command
line either via the `-bI:...` option or (with a leading `#! .` line) as
a normal input file like any other library file.

The linker import file plays the same role on AIX as import libraries do
on Windows.  Teach CMake to enable its import library abstraction on AIX
for executables with the `ENABLE_EXPORTS` target property set.  Teach
our internal `ExportImportList` script to optionally generate a leading
`#! .` line at the top of the generated export/import list.  Update our
rule for linking an executable with exports to generate a public-facing
"import library" implemented as an AIX linker import file.

With this approach, our existing infrastructure for handling import
libraries on Windows will now work for AIX linker import files too:

* Plugins that link to their executable's symbols will be automatically
  linked using the import file on the command line.

* The executable's import file will be (optionally) installed and
  exported for use in linking externally-built plugins.

This will allow executables and their plugins to build even if we later
turn off runtime linking.

Issue: #19163
2019-07-16 14:15:13 -04:00
Alex Turbov
0ba5891ead project: Keep leading 0 in PROJECT_VERSION components
Introduce CMake policy `CMP0096` to make `project()` keep leading zeros
in version components.  As a side effect, it now allows really long
version numbers.

Fixes: #19421
Co-Author: Brad King <brad.king@kitware.com>
2019-07-16 07:48:40 -04:00
Brad King
c2c3d22504 Tests: Drop RunCMake workaround for AIX ld warnings about GNU atexit
Drop the filtering added by commit e22c45d4c9 (Tests: Teach RunCMake to
ignore AIX ld warnings about GNU atexit, 2018-02-28, v3.12.0-rc1~419^2~6).
It is no longer needed now that we compute our own exports on AIX and
do not get these warnings when using shared libraries.
2019-07-15 13:27:16 -04:00
Brad King
9f5c2040bf AIX: Explicitly compute executable exports for both XL and GNU
On AIX, symbols in executables must be exported in order to be visible
to modules (plugins) they load via `dlopen`.  Prior to policy `CMP0065`,
CMake linked all executables with flags to export symbols, but the NEW
behavior for that policy is to do so only for executables that have the
`ENABLE_EXPORTS` target property set.  In both cases, CMake has always
used the AIX linker option `-bexpall` option to export symbols from
executables.

This has worked fairly well with the XL compiler, but with the GNU
compiler it works only for C ABI symbols.  The reason is that `-bexpall`
does not export symbols starting in `_` but the GNU C++ ABI mangles all
symbols with a leading `_`.  Therefore we have only supported C ABI
plugins with the GNU compiler on AIX.  Some projects have tried to work
around this by replacing `-bexpall` with `-bexpfull`, but the latter
often exports symbols that we do not want exported.

Avoid using `-bexpall` for executables by instead using by our own
internal `ExportImportList` script to compute symbol export lists from
the object files to be linked into an executable.  Pass the explicitly
computed export list to the AIX linker's `-bE:...` option.  We already
do this for shared object exports.

Issue: #19163
2019-07-15 13:27:16 -04:00
Brad King
5f84669806 Tests: Factor out RunCMake.project helper macro into module 2019-07-15 08:17:36 -04:00
Kyle Edwards
b8828ecbba cmake -E: Add true and false commands 2019-07-11 13:41:30 -04:00
Brad King
6e4e79e1b0 Merge topic 'fix_ctest_output'
adcbdb143c CTest: Clean up stdout and logfile output for Pass/Fail regex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3509
2019-07-11 08:50:36 -04:00
Brad King
4fc10431f0 Merge topic 'elseif'
f4ed56ab63 Fix elseif() in place of else()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !3515
2019-07-10 09:26:39 -04:00
Brad King
96a35a8eed Merge topic 'implicit-includes-cray-hlist'
0a7b61269c Merge branch 'backport-implicit-includes-cray-hlist'
98e371f13e Cray: Fix include parsing when the -hlist= flag is present

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3532
2019-07-10 09:21:24 -04:00
Craig Scott
f7eb765012 Merge topic 'add_cmake_find_use_package_registry'
447a96f590 vim: Update cmake.vim to include the CMAKE_FIND_USE variables
1d00ba9ccf Find: find_package prefers variable CMAKE_FIND_USE_REGISTRY
704e3a2ca8 Find: Correct spelling and layout issues in CMAKE_FIND_USE_ docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3487
2019-07-09 19:32:54 -04:00
Brad King
0a7b61269c Merge branch 'backport-implicit-includes-cray-hlist' 2019-07-09 13:13:26 -04:00
Chuck Atkins
98e371f13e Cray: Fix include parsing when the -hlist= flag is present
Update parsing logic from commit 5990ecb741 (Compute implicit include
directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2)
to handle the quoting behavior caused by the `-hlist=` flag.
2019-07-09 13:12:52 -04:00
Stephen Manz
adcbdb143c CTest: Clean up stdout and logfile output for Pass/Fail regex
For pass regex, display only the element that was found, rather
than all elements
Rename loop variable for fail regex, from pass to fail
For consistency, add space in output for pass
Add tests that find and don't find PASS_REGULAR_EXPRESSION, and a test
that finds FAIL_REGULAR_EXPRESSION, whose LastTest.log files are checked
using *-check.cmake.
2019-07-09 09:01:04 -07:00
Robert Maynard
704e3a2ca8 Find: Correct spelling and layout issues in CMAKE_FIND_USE_ docs 2019-07-09 09:37:55 -04:00
Artalus
f4ed56ab63 Fix elseif() in place of else() 2019-07-03 11:57:53 +03:00
Brad King
b08b640926 Merge topic 'deprecate-policy-old'
cf821ff3c4 Add deprecation warnings for policies CMP0067 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3502
2019-07-02 08:44:02 -04:00
Brad King
0b83df71e7 Merge topic 'double-export-error-message'
27d6e51ae9 Tests: add tests for export set error messages
49cfd39007 cmExportBuildFileGenerator: improve error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3486
2019-07-02 08:42:55 -04:00
Brad King
cf821ff3c4 Add deprecation warnings for policies CMP0067 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.8 and below to encourage projects to port away
from setting policies to OLD.
2019-07-01 10:21:06 -04:00
Craig Scott
56f5310112 Merge topic 'bug/19436'
822abf1265 list(POP_FRONT): Fix always assigning first item to output vars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3497
2019-07-01 07:42:04 -04:00
Alex Turbov
822abf1265 list(POP_FRONT): Fix always assigning first item to output vars
Fixes: #19436
2019-06-30 13:15:29 +03:00
Ben Boeckel
27d6e51ae9 Tests: add tests for export set error messages 2019-06-27 10:57:34 -04:00
Brad King
3327fe948e Merge topic 'vs-dpi-aware'
cd92f8f8bf VS: Add VS_DPI_AWARE target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3418
2019-06-27 08:56:41 -04:00
Matt Weir
cd92f8f8bf VS: Add VS_DPI_AWARE target property
Enables setting the visual studio project property for Manifests,
controlling the DPI Aware setting.
2019-06-26 09:55:49 -04:00
Brad King
06f1560a58 Merge topic 'build-install-rpath-genex'
d29ed8a114 BUILD_RPATH/INSTALL_RPATH: Add generator expression support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3481
2019-06-26 07:14:04 -04:00
Brad King
30eee7702f Merge topic 'export-targets-empty'
2ba5c37b3f export: Restore support for empty TARGETS list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3484
2019-06-26 07:03:25 -04:00
Brad King
2ba5c37b3f export: Restore support for empty TARGETS list
Refactoring in commit f5acecaa6f (cmExportCommand: Port to
cmArgumentParser, 2019-03-23, v3.15.0-rc1~270^2~3) broke the `export`
command's support for specifying `TARGETS` with no entries.  Fix it and
add a test case.

Fixes: #19415
2019-06-25 17:23:34 -04:00
Kyle Edwards
d29ed8a114 BUILD_RPATH/INSTALL_RPATH: Add generator expression support
Fixes: #19423
2019-06-25 10:55:03 -04:00
Brad King
1ba0cd2967 Merge topic 'vs-ce-deploy'
7035bdeb52 VS10Generator: add project properties to enable WindowsCE deployment.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3462
2019-06-24 08:25:41 -04:00
Robert Maynard
02f527c66a Find: Provide global controls for the NO_[]_PATH call options 2019-06-21 11:06:39 -04:00
Robert Maynard
f0a89149bc RunCMake: Automatically support platform out override files 2019-06-21 11:06:39 -04:00
Wil Stark
7035bdeb52 VS10Generator: add project properties to enable WindowsCE deployment.
Fixes: #19408
2019-06-19 15:11:57 -07:00
Brad King
7c7c8a01c5 Merge topic 'FindBoost-component'
830b332f32 FindBoost: Add tests for legacy variables
0dd6772a89 FindBoost: Add legacy variables and targets for compatibility
e4181eeaf2 FindBoost: Don't overwrite Boost_${_comp}_FOUND
4cb652e1d3 Tests.RunCMake.FindBoost: Fix example BoostConfig
7251d54bd1 Tests.FindBoost: Don't use BoostConfig in MODULE test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3438
2019-06-19 07:21:02 -04:00
Brad King
65fc109dc6 Merge branch 'FindBoost-component' into release-3.15
Merge-request: !3438
2019-06-18 08:37:52 -04:00
Alexander Grund
830b332f32 FindBoost: Add tests for legacy variables 2019-06-18 08:33:36 -04:00
Alexander Grund
4cb652e1d3 Tests.RunCMake.FindBoost: Fix example BoostConfig 2019-06-18 08:24:42 -04:00
Kyle Edwards
77e59e442d Merge topic 'escape-install-rpath'
4caefbb423 cmInstallTargetGenerator: Add tests for the RPATH_CHANGE rule
749ce48eb5 cmInstallTargetGenerator: Escape generated OLD_RPATH argument
9e84c7c5e8 cmInstallTargetGenerator: Introduce CMP0095

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3383
2019-06-17 10:04:47 -04: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
Brad King
f07200fe16 Merge topic 'add-test-command-expand-lists'
e791ffac61 add_test: Add COMMAND_EXPAND_LISTS option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3422
2019-06-12 12:48:13 -04:00
Brad King
1492dc8301 Merge topic 'capabilities-fileapi'
c932f49842 cmake: Teach -E capabilities to report supported fileapi requests
6696855f72 cmake: Simplify implementation of -E capabilities
6b815e58ba fileapi: Factor out helper to construct a version object

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3433
2019-06-12 11:40:47 -04: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
Sergey Bobrenok
e791ffac61 add_test: Add COMMAND_EXPAND_LISTS option
Add a `COMMAND_EXPAND_LISTS` option to the `add_test` command to cause
`;`-separated lists produced by generator expressions to be expanded
into multiple arguments.  The `add_custom_command` command already
has such an option.

Fixes: #17284
2019-06-07 13:14:29 -04:00
Brad King
c932f49842 cmake: Teach -E capabilities to report supported fileapi requests
Fixes: #19339
2019-06-07 11:08:38 -04:00
Brad King
c0f00079a9 Tests: Fix RunCMake.ctest_update test to not require GIT_EXECUTABLE
Fix the test case added by commit 95db11fdb1 (ctest: Include ChangeId in
Update.xml, 2019-04-23) to work in a release branch of CMake.
The `GIT_EXECUTABLE` value is not set before we add this test in
release branch builds.
2019-06-04 12:27:32 -04:00
Brad King
842f70c493 Merge topic 'emulator-arguments'
fec441ec17 Teach CROSSCOMPILING_EMULATOR to support arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3402
2019-06-04 08:37:55 -04:00
Brad King
a7d2efc15b Merge topic 'remove_directories'
07a80c7002 cmake: Teach -E remove_directory to remove multiple directories
013bee698e Tests: Add RunCMake.CommandLine make_directory test checks
3eb16de327 Tests: Fix RunCMake.CommandLine make_directory test name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3411
2019-06-04 08:37:04 -04:00
Brad King
65f5df7d08 Merge topic 'executables-are-consoled'
b06f4c8a74 Swift: disallow WIN32_EXECUTABLE properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3410
2019-06-04 08:34:21 -04:00