1287 Commits

Author SHA1 Message Date
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
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
Jiang Yue
bd2793b6e9 Help: Add documentation for INSTALL_REMOVE_ENVIROMENT_RPATH 2019-07-25 12:30:24 -04:00
Robert Maynard
d6be117ca0 ExternalProject: Support not initializing any submodules
Fixes #15592
2019-07-24 09:36:30 -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
Gabor Bencze
407dd1a910 Help: Add documentation for SKIP_REGULAR_EXPRESSION test property 2019-07-18 15:45:09 -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
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
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
Martin Gerhardy
09c1991895 Eclipse: Add option to set the resource encoding 2019-07-09 13:34:29 -04:00
Robert Maynard
1d00ba9ccf Find: find_package prefers variable CMAKE_FIND_USE_REGISTRY
CMake's find control flags should all have a consistent name.
To make this happen we are introducing `CMAKE_FIND_USE_REGISTRY`
and deprecating `CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`.
2019-07-09 09:38:35 -04:00
Robert Maynard
704e3a2ca8 Find: Correct spelling and layout issues in CMAKE_FIND_USE_ docs 2019-07-09 09:37:55 -04:00
Craig Scott
2113705c5b Merge topic 'loglevel-option-case-consistency'
14ed40d670 Help: Use consistent levels for cmake --loglevel and message()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3521
2019-07-09 08:40:29 -04:00
Brad King
bf7f5d0a22 Merge topic 'threads-are-good'
08cd7f6a02 Swift: support multithreaded compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3506
2019-07-08 11:26:29 -04:00
Craig Scott
14ed40d670 Help: Use consistent levels for cmake --loglevel and message()
The message() command requires uppercase log levels. Even
though the cmake --loglevel option is not case sensitive, show
the supported values as uppercase to match the message()
docs as closely as possible, since they are related to the same
feature.

Also fixes the wrong string being shown for the warning level
by cmake --help.
2019-07-08 20:11:33 +10:00
Craig Scott
01c0d863f4 Merge topic 'docs-misc-trivial-cleanups'
d5b722bbbd Help: Remove mention of CMAKE_INSTALL_DO_STRIP
ddc7ea4696 Help: Clarify how to provide multiple targets with cmake --target
c509f38b7b Help: Add missing xref for CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
9cc6befe1b Help: Improve formatting of list(TRANSFORM) sub-options
074fbdb73f Help: Clean up trivial typos and grammar

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !3498
2019-07-04 08:25:25 -04:00
Craig Scott
d5b722bbbd Help: Remove mention of CMAKE_INSTALL_DO_STRIP
It isn't yet clear whether we want to make this part of the
documented API for the install script. Remove it from the
docs before it appears in an official release for now.

Relates: #18997
2019-07-03 23:38:25 +10:00
Craig Scott
ddc7ea4696 Help: Clarify how to provide multiple targets with cmake --target 2019-07-03 23:38:25 +10:00
Craig Scott
074fbdb73f Help: Clean up trivial typos and grammar 2019-07-03 23:38:25 +10:00
Craig Scott
1cc8f85e1a Merge topic 'doc-toolchain-file-CMAKE_SOURCE_DIR'
16434fe303 Help: Discourage using CMAKE_SOURCE_DIR in toolchain files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3495
2019-07-03 05:01:13 -04:00
Oleg Chernovskiy
16434fe303 Help: Discourage using CMAKE_SOURCE_DIR in toolchain files
Fixes: #19390
2019-07-03 08:45:29 +10:00
Saleem Abdulrasool
08cd7f6a02 Swift: support multithreaded compilation
Query the number of logical CPUs available to enable parallel
compilation for Swift.
2019-07-02 10:45:07 -07: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
Kyle Edwards
dc764bd80d Help: Move CMP0095 into CMake 3.16 section
CMP0095 was introduced in 3.16, but was mistakenly put in the notes
for 3.15. This error was not caught during review. Move it into the
notes for 3.16.
2019-06-25 09:56:20 -04:00
Robert Maynard
02f527c66a Find: Provide global controls for the NO_[]_PATH call options 2019-06-21 11:06:39 -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
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
fa00a3b29b Merge branch 'capabilities-fileapi' into release-3.15
Merge-request: !3433
2019-06-12 11:42:44 -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
Brad King
c932f49842 cmake: Teach -E capabilities to report supported fileapi requests
Fixes: #19339
2019-06-07 11:08:38 -04:00
Craig Scott
cebccdebaf Help: Move ADDITIONAL_MAKE_CLEAN_FILES dir prop to deprecated section 2019-06-07 21:08:08 +10: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
John Freeman
07a80c7002 cmake: Teach -E remove_directory to remove multiple directories
The `make_directory` command can make multiple directories in a single
invocation.  Make `remove_directory` mirror that behavior.
2019-06-03 14:20:00 -04:00
Robert Maynard
808b818063 Genex: CompileLang and CompileLangAndId now match against a list of ids
This allows for expressions such as:

 $<COMPILE_LANG_AND_ID, CXX, GNU, Clang>
2019-06-03 10:20:23 -04:00
Robert Maynard
9fd602bfd3 Genex: PlatformId now can match against a list of ids. 2019-06-03 10:20:23 -04:00
Robert Maynard
ec66af2026 Genex: CompilerId now can match against a list of ids.
This allows for expressions like:
 $<$<CXX_COMPILER_ID:Clang,GNU>:-DMY_PRIVATE_DEFINE>
2019-06-03 10:20:23 -04:00
Brad King
187928875d Merge topic 'vs-add-package-reference'
42e14d90b1 VS: Added support for VS package references for nuget

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Merge-request: !3389
2019-05-31 13:18:31 -04:00
Kinan Mahdi
42e14d90b1 VS: Added support for VS package references for nuget 2019-05-30 10:22:44 -04:00
Brad King
05af1770a0 Merge topic 'tar-zstd-compression'
53cb1f2d04 cmake: Teach cmake -E tar command, Zstandard compression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3357
2019-05-30 09:39:35 -04:00