515 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
Jiang Yue
bd2793b6e9 Help: Add documentation for INSTALL_REMOVE_ENVIROMENT_RPATH 2019-07-25 12:30:24 -04:00
Robert Maynard
609fe39043 FindPackage: Support NO_[]_PATH global call options 2019-07-22 17:17:02 -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
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
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
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
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
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
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
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
074fbdb73f Help: Clean up trivial typos and grammar 2019-07-03 23:38:25 +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
Robert Maynard
d3ebef4f70 CMAKE_CUDA_HOST_COMPILER: Document it takes priority over CUDAHOSTCXX 2019-06-27 14:39:24 -04:00
Robert Maynard
02f527c66a Find: Provide global controls for the NO_[]_PATH call options 2019-06-21 11:06:39 -04:00
Brad King
a45f061296 Merge topic 'doc-project-include'
8a08d0c092 Help: Document what project() calls use CMAKE_PROJECT_INCLUDE and friends

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3453
2019-06-18 07:56:08 -04:00
Brad King
e2b4fa1141 Merge branch 'doc-project-include' into release-3.15
Merge-request: !3453
2019-06-18 07:56:00 -04:00
Brad King
8a08d0c092 Help: Document what project() calls use CMAKE_PROJECT_INCLUDE and friends
Fixes: #19340
2019-06-17 11:06:07 -04:00
Brad King
923f58ec73 Help: Document XLClang compiler id
This compiler id was added by commit 90c6156aa8 (XLClang: Add a new
compiler ID for the clang-based XL compiler, 2019-02-05,
cpp-modules-20190312.1~71^2~7).  Add documentation accidentally left out
of that commit.

Issue: #18835
2019-06-06 10:13:47 -04:00
Marek Antoniak
fec441ec17 Teach CROSSCOMPILING_EMULATOR to support arguments
Fixes: #19321
2019-06-03 10:17:17 -04:00
Brad King
22aabdfde0 Merge topic 'cmake_automoc_relaxed_mode_deprecation'
df6adb02c0 Autogen: Deprecation release notes for CMAKE_AUTOMOC_RELAXED_MODE
5bf07b9cfc Help: Mark CMAKE_AUTOMOC_RELAXED_MODE as deprecated
b5ad572ac1 Autogen: Deprecation message for CMAKE_AUTOMOC_RELAXED_MODE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3381
2019-05-28 11:56:24 -04:00
Sebastian Holtermann
5bf07b9cfc Help: Mark CMAKE_AUTOMOC_RELAXED_MODE as deprecated 2019-05-27 13:13:08 +02:00
Craig Scott
902af25512 Help: Fix typo for CTEST_CUSTOM_WARNING_xxx vars
These variables apply to the `ctest_build` command, not `ctest_test`

Relates: #19217
2019-05-26 22:31:23 +10:00
Ben Boeckel
25b2c7e4cd Help/CMAKE_JOB_POOL_LINK: match the header line with the variable 2019-05-24 09:31:56 -04:00
Brad King
cbd1c5b4ab Merge topic 'framework-var'
26ea022c3b Add variable CMAKE_FRAMEWORK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3347
2019-05-23 08:57:36 -04:00
Brad King
8ed6efbbd3 Merge topic 'default-generator-env'
d0f0ba0f7a Tests: Add environment generator tests
a48ce8f4bf Help: Add documentation for default generator environment variables
083cf7e8a2 cmake: Allow default generator to be set by environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3218
2019-05-22 10:32:43 -04:00
Eicke Herbertz
a48ce8f4bf Help: Add documentation for default generator environment variables
Documentation for environment variables that control the default
generator selection:

* CMAKE_GENERATOR
* CMAKE_GENERATOR_INSTANCE
* CMAKE_GENERATOR_PLATFORM
* CMAKE_GENERATOR_TOOLSET
2019-05-22 07:40:49 -04:00
Cristian Adam
26a99da206 find_package: Add option to prefer Config mode
Add a `CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable to tell
`find_package` calls to look for a package configuration file
first even if a find module is available.

Fixes: #16805, #19236
2019-05-21 10:29:47 -04:00
Ruslan Baratov
26ea022c3b Add variable CMAKE_FRAMEWORK 2019-05-21 14:26:23 +03:00
Saleem Abdulrasool
d745551fb6 Help: add some initial documentation for Swift support 2019-05-16 14:41:05 -04:00
Brad King
64a7f491ef Merge topic 'armclang'
7b0abaac31 ARMClang: Add support for Clang-based ARM compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3315
2019-05-16 10:27:44 -04:00
Brad King
9ee24ede73 Merge topic 'msvc-jmc'
2a9ff9703e MSVC: Add support for /JMC (Just My Code)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3121
2019-05-15 14:06:58 -04:00
Johan Stridkvist
7b0abaac31 ARMClang: Add support for Clang-based ARM compiler
Fixes: #18215
2019-05-14 14:59:55 -04:00
Luca Cappa
2a9ff9703e MSVC: Add support for /JMC (Just My Code) 2019-05-14 13:27:18 -04:00
Zack Galbreath
2a34d0ac36 ctest: Add new variable CTEST_UPDATE_VERSION_OVERRIDE
Set this in a CTest script to explicitly define what the current revision
will be reported as in Update.xml.
2019-05-07 10:45:47 -04:00
Zack Galbreath
7ddac95121 Help: cross-ref and wording of docs related to ctest_update()
Provide better motivation for users to click through to the CTest manual
from the ctest_update command help page.
2019-05-03 20:26:50 +10:00
Brad King
60b28de5c8 Merge topic 'add-execute_process-command-echo'
044dcf9f8d execute_process: Add option to echo command lines
d350fb6889 execute_process: Manage KWSys Process lifetime with unique_ptr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3165
2019-04-30 10:05:09 -04:00
Brad King
cb23f2ac8b Merge topic 'vs-default-platform'
db02be85a0 VS: Provide the default platform name to project code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3246
2019-04-22 07:38:33 -04:00
Bill Hoffman
044dcf9f8d execute_process: Add option to echo command lines
Add COMMAND_ECHO option to the execute_process command. This will allow
execute_process to show the command it will run. Also add a cmake variable
CMAKE_EXECUTE_PROCESS_COMMAND_ECHO. Both the option and the variable can
be set to one of the following: STDERR|STDOUT|NONE. The command will be
printed to stderr or stdout or not at all.

Fixes: #18933
2019-04-19 13:32:08 -04:00
Brad King
db02be85a0 VS: Provide the default platform name to project code
The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio
generators based on `CMAKE_GENERATOR_PLATFORM` or some default.
Prior to the VS 2019 generator, the default was always `Win32`.
However, for the `Visual Studio 16 2019` generator, the default is
based on the host platform.

Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for
use by project code.  This is particularly useful in toolchain files
because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so
`CMAKE_VS_PLATFORM_NAME` is not yet known.  Of course the toolchain file
author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not
then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that
will be used.

Fixes: #19177
2019-04-19 07:46:13 -04:00
Brad King
fb3370b6a1 MSVC: Add abstraction for runtime library selection
Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class
abstraction to select the runtime library from an enumeration of logical
names.  We've long hesitated to do this because the idea of "runtime
library selection" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flags requires a policy because existing
projects may rely on string processing to edit them and choose a runtime
library under the old behavior.  Add policy CMP0091 to provide
compatibility.

Fixes: #19108
2019-04-17 11:00:44 -04:00
Bartosz Kosiorek
cb33befe2d Modules: Update documentation formatting 2019-04-08 14:55:56 +02:00
Bartosz Kosiorek
0e4fbb4a1f Help: Improve formatting of Help documentation 2019-04-08 14:53:31 +02:00
Brad King
56abc31270 Merge topic 'improve-documentation'
456e0fb64f Help: Improve documentation formating

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3174
2019-04-04 11:48:55 -04:00