Commit Graph

3687 Commits

Author SHA1 Message Date
Brad King
d275877dfc Merge topic 'better_gen_exp_example_tutotrial'
fa203ee323 Tutorial: Improve Step 10 generator expression example.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3571
2019-07-29 11:49:45 -04:00
Brad King
23503ba5f0 Merge topic 'android-ndk-r19'
97bca2f9fa Android: Use unified toolchain in NDK r19+
19f36c5fb2 Android: Update test to not require GCC compiler to exist in NDK
f3e32ddae9 Android: Re-order system initialization to select sysroot last
9a0720b819 Android: Clarify name of internal variable for arch triple
4e6c58d937 Android: Select NDK host tag while determining system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3612
2019-07-29 11:48:33 -04:00
Brad King
4542ec239a Help/dev: Add release commit instructions to maintainer guide 2019-07-26 14:34:09 -04:00
Brad King
97bca2f9fa Android: Use unified toolchain in NDK r19+
The NDK build system now uses only a single toolchain in

    <ndk>/toolchains/llvm/prebuilt/<host>

Its compilers are always `bin/{clang,clang++}` and its binutils are
always `bin/<triple>-*`.  It is a standalone toolchain:

* The Anrdoid API level is specified at the end of `--target=`.
* The standard library may be specified via `-stdlib=`.
* No need to pass system includes or libraries explicitly.
* No need to pass `--sysroot` or `-gcc-toolchain`.

Teach CMake to recognize NDK versions that have a unified
toolchain with its own sysroot and use the above approach.

Fixes: #18739
2019-07-26 14:17:07 -04:00
Brad King
8ce189720e Merge topic 'cmake-version-rc'
eb5ea5a505 CMakeVersion: Use '-rc0' version suffix on release branches prior to rc1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3609
2019-07-26 12:19:25 -04:00
Kyle Edwards
8fd481a899 Merge topic 'ep_support_no_submodule_init'
d6be117ca0 ExternalProject: Support not initializing any submodules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3579
2019-07-26 12:02:34 -04:00
Kyle Edwards
618bd463ad Merge topic 'remove_compiler_rpath'
bd2793b6e9 Help: Add documentation for INSTALL_REMOVE_ENVIROMENT_RPATH
f08dcbffec Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3544
2019-07-26 12:01:27 -04:00
Brad King
eb5ea5a505 CMakeVersion: Use '-rc0' version suffix on release branches prior to rc1
Revert the change from commit 7b354baad5 (CMakeVersion: Set
CMake_VERSION_RC to 0 even in non-rc versions, 2019-07-25) and instead
define a `0` value in `CMake_VERSION_RC` to mean `-rc0`.  This
distinguishes release branch versions prior to the first release
candidate from the first release candidate itself.  It also makes room
for a dedicated "CMake $major.$minor.0-rc1" release commit for `-rc1` as
we have for later release candidates and final releases.
2019-07-26 08:08:30 -04:00
Brad King
8df10447a1 Merge topic 'doc-relnotes-3.15'
3b113cc131 Help: Add 3.15.1 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3608
2019-07-26 07:37:19 -04:00
Brad King
3b113cc131 Help: Add 3.15.1 release notes 2019-07-26 07:18:09 -04:00
Jiang Yue
bd2793b6e9 Help: Add documentation for INSTALL_REMOVE_ENVIROMENT_RPATH 2019-07-25 12:30:24 -04:00
Brad King
7b354baad5 CMakeVersion: Set CMake_VERSION_RC to 0 even in non-rc versions
The logic that uses this value already ignores any "false" value, so `0`
is just as good as not being set at all.  Using `0` for this role makes
the version components look more symmetric and reduces the number of
edits needed when creating releases.
2019-07-25 09:23:48 -04:00
Robert Maynard
fa203ee323 Tutorial: Improve Step 10 generator expression example.
Use compiler flags and standard levels as the compelling argument
for using generator expressions and interface libraries
2019-07-25 07:30:13 -04:00
Brad King
6e0d92cc53 Merge topic 'clang-gnulike-support'
a4657ef670 Merge branch 'backport-clang-gnulike-support' into clang-gnulike-support
161b33f12b Help/guide/tutorial: Revert "require C++14 for the Tutorial"
4f15a6a5c2 Tests: Revert "require C++14 for the Tutorial"
5cfc39127e Merge branch 'backport-clang-gnulike-support' into clang-gnulike-support
d50b31be35 Clang: For MSVC ABI do not use modes older than C++14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3592
2019-07-25 07:17:22 -04:00
Robert Maynard
d6be117ca0 ExternalProject: Support not initializing any submodules
Fixes #15592
2019-07-24 09:36:30 -04:00
Brad King
161b33f12b Help/guide/tutorial: Revert "require C++14 for the Tutorial"
Revert the changes from commit a2a90f41e3 (Tests: require C++14 for the
Tutorial, 2019-03-21, v3.15.0-rc1~41^2~2) for the content in its new
home.  In commit d50b31be35 (Clang: For MSVC ABI do not use modes older
than C++14, 2019-07-23) we fixed the C++ standard selection for GNU-like
Clang with the MSVC ABI so the test code itself no longer needs to do
it.  In particular, changing the tests in this way broke the tutorial's
narrative.
2019-07-24 08:04:20 -04:00
Robert Maynard
609fe39043 FindPackage: Support NO_[]_PATH global call options 2019-07-22 17:17:02 -04:00
Brad King
c1cb4945f3 Merge topic 'tutorial_reference_cmake_install_command'
c94e62c07e Tutorial: Updated to reference using cmake --install

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3572
2019-07-22 08:20:34 -04:00
Brad King
303cf2791a Merge topic 'doc-string-multibyte'
b97673f54b Help: Add note to each string() subcommand that assumes ASCII input
26cd64d977 Help: Fix language and formatting inconsistencies for string() command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3559
2019-07-22 08:19:39 -04:00
Craig Scott
9e42075498 Merge topic 'cpack-install-scripts'
5f96601675 CPack: Introduce CPACK_INSTALL_SCRIPTS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3531
2019-07-22 07:04:00 -04:00
Craig Scott
f4131e4e1b Merge topic 'feature/message-indent'
5f6fd917a3 message(): Control indentation via CMAKE_MESSAGE_INDENT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3464
2019-07-22 07:02:50 -04:00
Alex Turbov
5f96601675 CPack: Introduce CPACK_INSTALL_SCRIPTS variable
The singular name `CPACK_INSTALL_SCRIPT` has existed but was not linked
from the CPack documentation.  Also, it supported multiple values and
should have had a plural name.  Add a plural-named alternative now.
If both `CPACK_INSTALL_SCRIPTS` and `CPACK_INSTALL_SCRIPT` are set then
ignore the latter with a warning.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2019-07-22 02:01:44 +03:00
Alex Turbov
5f6fd917a3 message(): Control indentation via CMAKE_MESSAGE_INDENT 2019-07-21 10:19:30 +10:00
Robert Maynard
c94e62c07e Tutorial: Updated to reference using cmake --install
This is preferred over using `make install` as it allows for control
over the install location, configuration, and component.
2019-07-19 14:38:05 -04:00
Kyle Edwards
16bb46eaf3 Merge topic 'skip_regular_expression'
5dbd9c8583 Vim: Add SKIP_REGULAR_EXPRESSION test property to vim syntax file
407dd1a910 Help: Add documentation for SKIP_REGULAR_EXPRESSION test property
d7955d4e5d Tests: Create test for SKIP_REGULAR_EXPRESSION test property
4f1dec86a5 CTest: Add SKIP_REGULAR_EXPRESSION test property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3570
2019-07-19 12:14:27 -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
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
Craig Scott
b97673f54b Help: Add note to each string() subcommand that assumes ASCII input
Fixes: #19465
2019-07-19 20:47:21 +10:00
Craig Scott
26cd64d977 Help: Fix language and formatting inconsistencies for string() command 2019-07-19 20:47:21 +10:00
Gabor Bencze
407dd1a910 Help: Add documentation for SKIP_REGULAR_EXPRESSION test property 2019-07-18 15:45:09 -04: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
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
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
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
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
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
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
0964a96972 Merge topic 'FindBISON-CMP0088-SourcePath'
f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3549
2019-07-15 07:34:01 -04:00
Brad King
7242d81269 Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.15
Merge-request: !3549
2019-07-12 16:21:26 -04:00
Brian Carlson
f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths
Now that the working directory is in the build tree, relative input
paths must be converted to an absolute path to remain relative to the
source directory.

Fixes: #19472
2019-07-12 16:20:08 -04:00
Brad King
8212b0880d Merge topic 'cmake-e-true-false'
b8828ecbba cmake -E: Add true and false commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3542
2019-07-12 16:12:20 -04:00
Brad King
82a72bfc1b Merge topic 'ctest_make_program__propagated_to_cmake_configure_pass'
cd681f1f41 ctest: propagate make program to cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3483
2019-07-12 16:10:32 -04:00
Kyle Edwards
b8828ecbba cmake -E: Add true and false commands 2019-07-11 13:41:30 -04:00
Brad King
01a8b89f29 Merge topic 'eclipse-resource-encoding'
09c1991895 Eclipse: Add option to set the resource encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3525
2019-07-11 08:49:34 -04:00
Robert Maynard
cd681f1f41 ctest: propagate make program to cmake 2019-07-11 08:28:35 -04:00
Craig Scott
24722b7860 Merge topic 'docs-file-GLOB-case-sensitivity'
c65f296960 Help: Mention file(GLOB)'s case-sensitivity

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3516
2019-07-11 06:07:26 -04:00