Commit Graph

44233 Commits

Author SHA1 Message Date
Brad King
a2daa3ef27 Merge topic 'modernize_std_unique_ptr'
3bed969dac cmMakefile: Modernize AddFunctionBlocker method to accept a std::unique_ptr
faacb90a13 cmELF: Modernize to use std::unique_ptr instead of new/delete

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3548
2019-07-19 11:59:04 -04:00
Brad King
37b998dd3e Merge branch 'release-3.15' 2019-07-19 11:57:30 -04:00
Brad King
dcdeade5ee Merge topic 'msvc-runtime-library-doc'
282d9f3168 MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3573
2019-07-19 11:57:10 -04:00
Brad King
6618cbf38a Merge topic 'vs-asmlist-dir'
c1fc6c80c7 VS: Place intermediate files in the "ASM List Location" next to objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3569
2019-07-19 11:55:48 -04:00
Brad King
8d22999753 Merge branch 'msvc-runtime-library-doc' into release-3.15
Merge-request: !3573
2019-07-19 11:18:44 -04:00
Brad King
282d9f3168 MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set
By default `CMAKE_MSVC_RUNTIME_LIBRARY` is not set.  Document the
default runtime library selection in that case.  We already test it.
2019-07-19 11:17:32 -04:00
Kyle Edwards
1bdb5a3b51 Merge topic 'findvulcan-doc-fix'
6cc4ca31d5 Fix repeated word in FindVulkan.cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3575
2019-07-19 10:05:15 -04:00
Kitware Robot
ac000e29da CMake Nightly Date Stamp 2019-07-19 00:01:07 -04:00
NeroBurner
6cc4ca31d5 Fix repeated word in FindVulkan.cmake 2019-07-18 17:25:04 -04:00
Brad King
d96bc3cf04 Merge branch 'vs-asmlist-dir' into release-3.15
Merge-request: !3569
2019-07-18 11:41:49 -04:00
Brad King
c1fc6c80c7 VS: Place intermediate files in the "ASM List Location" next to objects
The `AssemblerListingLocation` setting in VS project files is meant for
intermediate files created during the build much like object files.
When the VS 7 generator was first under development, commit 49aebe6c99
(new arch, 2002-09-04) placed both object files and the ASM list
location in the same directory.  Later commit f9aef0e422 (Generator now
creates a separate intermediate files directory for each target,
2005-07-27) moved the object files to a per-target directory but the
ASM list location was not moved with them.  Move it now.

Fixes: #19480
2019-07-18 11:40:58 -04:00
Brad King
e3bd5c5b66 Merge branch 'release-3.15' 2019-07-18 07:53:06 -04:00
Brad King
d59716d907 Merge topic 'swift-improvements'
f19c189e74 Merge branch 'backport-swift-improvements' into swift-improvements
5803a8a2f7 Swift: support SONAME on ELFish targets
47e28cbe1f Swift: support multithreaded compilation
6814567e8c Swift: add rules for static linking
c8741e8ff5 Swift: Add library search paths for dependencies
be0d404208 Support per-language library link flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3568
2019-07-18 07:50:40 -04:00
Brad King
1a2d260634 Merge branch 'backport-swift-improvements' into release-3.15
Merge-request: !3568
2019-07-18 07:47:05 -04:00
Brad King
f19c189e74 Merge branch 'backport-swift-improvements' into swift-improvements 2019-07-18 07:46:42 -04:00
Brad King
0a3dd07fb6 Merge branch 'release-3.15' 2019-07-18 07:43:40 -04:00
Brad King
ae84427e32 Merge topic 'FindPython-interpreter-crosscompiling'
696d0f9caf FindPython: ensure interpreter is founded when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3564
2019-07-18 07:15:48 -04:00
Brad King
c79032438c Merge branch 'FindPython-interpreter-crosscompiling' into release-3.15
Merge-request: !3564
2019-07-18 07:14:55 -04:00
Marc Chevrier
696d0f9caf FindPython: ensure interpreter is founded when cross-compiling
Fixes: #19473
2019-07-18 07:13:20 -04:00
Brad King
52fa25e28f Merge topic 'aix-no-rtl'
3fb3157dae AIX: Do not enable runtime linking by default anymore

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3566
2019-07-18 07:08:08 -04:00
Kitware Robot
94b883d9d3 CMake Nightly Date Stamp 2019-07-18 00:01:08 -04:00
Saleem Abdulrasool
5803a8a2f7 Swift: support SONAME on ELFish targets
We should enable the soname to be setup for ELF shared libraries.
Failure to do so generates binaries with incorrect names which prevents
loading.
2019-07-17 20:46:25 -07:00
Saleem Abdulrasool
47e28cbe1f Swift: support multithreaded compilation
Query the number of logical CPUs available to enable parallel
compilation for Swift.
2019-07-17 20:46:08 -07:00
Saleem Abdulrasool
6814567e8c Swift: add rules for static linking
The Swift driver recently learnt how to generate static libraries using
the `-static` flag.  This enables us to generate proper static libraries
with dependency tracking with Swift as well.
2019-07-17 20:45:54 -07:00
Saleem Abdulrasool
c8741e8ff5 Swift: Add library search paths for dependencies
When building Swift executables and libraries which import a module, an
implicit link will be added by the driver.  Because this links by name
rather than path, the library search path needs to be provided to
indicate where to find the library.  For all local dependencies, add the
library paths for the targets when linking.  This ensures that you can
link against local libraries without explicitly setting a library path.

Fixes: #19304
2019-07-17 20:45:19 -07:00
Saleem Abdulrasool
be0d404208 Support per-language library link flags
This changes the behaviour of the generators to use a per-language
library search path flag.  This is needed for multi-language projects
with different compilers (e.g. cl + gfortran).  Since the adjusted
variable has been part of the user settings, we control this based on a
policy.

Fixes: #19307
2019-07-17 20:44:58 -07:00
Brad King
3fb3157dae AIX: Do not enable runtime linking by default anymore
We've long created shared objects on AIX using the linker's `-G` option
(also offered by the XL front-end).  The `-G` option implies `-brtl` and
enables runtime linking.  This has been largely unnecessary because we
provide all dependencies on the link line and both XL and GNU compilers
offer builtin behavior to export symbols.  Since commit 0f150b69d3 (AIX:
Explicitly compute shared object exports for both XL and GNU,
2019-07-11) we compute exports explicitly and consistently.
Therefore runtime linking is no longer necessary for shared objects.

We've also long created executables on AIX using the linker's `-brtl`
option to enable runtime linking in case they load plugins at runtime.
Since commit 9f5c2040bf (AIX: Explicitly compute executable exports for
both XL and GNU, 2019-07-12) and commit 2fa920c0cd (AIX: Create import
library for executables with exports, 2019-07-16) we now provide the
linker enough information to fully resolve symbols in plugins up front.
Therefore runtime linking is no longer necessary for executables.

Drop use of `-G` for creating shared objects and use the XL `-qmkshrobj`
and GCC `-shared` options instead.  Both invoke the linker with the
`-bM:SRE -bnoentry` options to create a shared object without runtime
linking enabled.  Also drop use of `-brtl` for creating executables.

Issue: #19163
2019-07-17 14:21:37 -04:00
Brad King
744dd2cccb Merge branch 'release-3.15' 2019-07-17 10:06:59 -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
Sebastian Holtermann
3bed969dac cmMakefile: Modernize AddFunctionBlocker method to accept a std::unique_ptr 2019-07-17 14:58:27 +02:00
Sebastian Holtermann
faacb90a13 cmELF: Modernize to use std::unique_ptr instead of new/delete 2019-07-17 14:58:27 +02:00
Brad King
79bcf4e165 CMake 3.15.0 v3.15.0 2019-07-17 07:54:31 -04:00
Brad King
74ad28fa6a Merge topic 'cmake-qch-no-version-in-filename'
0518e675ea CMake.qch: Don't include the version in the file name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3558
2019-07-17 07:49:12 -04:00
Craig Scott
0518e675ea CMake.qch: Don't include the version in the file name
Fixes: #19374
2019-07-17 21:35:12 +10: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
119fb8606a Merge branch 'release-3.15' 2019-07-17 07:20:47 -04:00
Brad King
3f84ff212c Merge topic 'find_package-fix-NO_MODULE'
f2edccea66 find_package: Fix NO_MODULE under CMAKE_FIND_PACKAGE_PREFER_CONFIG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3557
2019-07-17 07:20:20 -04:00
Kitware Robot
b119968048 CMake Nightly Date Stamp 2019-07-17 00:01:08 -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
Brad King
c3d9d80015 Merge topic 'aix-explicit-exports'
c2c3d22504 Tests: Drop RunCMake workaround for AIX ld warnings about GNU atexit
9f5c2040bf AIX: Explicitly compute executable exports for both XL and GNU
0f150b69d3 AIX: Explicitly compute shared object exports for both XL and GNU
a5bf4e7921 AIX: Drop redundant -brtl flags
9cb5f040d7 XL: De-duplicate shared object creation flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3556
2019-07-16 10:30:38 -04:00
Brad King
76a540bab5 Merge topic 'doc-ENABLE_EXPORTS'
84ddeb8fa5 Help: Clarify ENABLE_EXPORTS per-platform link behavior
e29ccfcafb Help: Simplify CMAKE_ENABLE_EXPORTS documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3560
2019-07-16 10:28:54 -04:00
Brad King
84ddeb8fa5 Help: Clarify ENABLE_EXPORTS per-platform link behavior
Spell out the behavior on each platform in a bullet list.
2019-07-16 10:09:40 -04:00
Brad King
e29ccfcafb Help: Simplify CMAKE_ENABLE_EXPORTS documentation
In real projects the variable form should rarely be used because the
decision to export symbols from an executable is very specific.
Remove its main description, which duplicates the `ENABLE_EXPORTS`
target property, and simply reference the property instead.
2019-07-16 10:09:06 -04:00
Brad King
185e6a1288 Merge branch 'find_package-fix-NO_MODULE' into release-3.15
Merge-request: !3557
2019-07-16 09:12:56 -04:00
Cristian Adam
f2edccea66 find_package: Fix NO_MODULE under CMAKE_FIND_PACKAGE_PREFER_CONFIG
The module mode fallback added by commit 22e65d10c1 (find_package: Fixed
CMAKE_FIND_PACKAGE_PREFER_CONFIG Module fallback, 2019-06-13,
v3.15.0-rc2~6^2) should not be used unless the `find_package` call
allows module mode.  Doing so can lead to infinite recursion if a find
module tries to call config mode with `find_package(...  NO_MODULE)`.
Fix the logic and add a test case.

Fixes: #19478
2019-07-16 09:09:24 -04:00
Brad King
09b4dfb92a Merge branch 'release-3.14' 2019-07-16 08:36:40 -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
79a21ba680 Merge topic 'FindPNG-msvc-static'
95f8b0aec7 FindPNG: Add static libpng names for MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3552
2019-07-16 07:24:14 -04:00
Brad King
e0d45ddab5 Merge topic 'FindMatlab/pre-2018-fixes'
cd6bd8391a FindMatlab: code comment and ordering of the finders
9e6206c59b FindMatlab: fixing extension bat file invocation error
a9b36ea69f FindMatlab: Fixing compilation issues on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3554
2019-07-16 07:23:20 -04:00
Brad King
96541918c8 CMake 3.14.6 v3.14.6 2019-07-16 07:08:05 -04:00