Merge topic 'extend_toolchain_flag_to_cmake_preset'

a9b968bb98 cmake-presets: Introduce `toolchainFile` preset option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6045
This commit is contained in:
Brad King
2021-05-04 15:54:41 +00:00
committed by Kitware Robot
15 changed files with 129 additions and 2 deletions

View File

@@ -182,6 +182,14 @@ that may contain the following fields:
ignore the field, but the IDE can use them to set up the environment
before invoking CMake.
``toolchainFile``
An optional string representing the path to the toolchain file.
This field supports `macro expansion`_. If a relative path is specified,
it is calculated relative to the build directory, and if not found,
relative to the source directory. Takes precedence over any `CMAKE_TOOLCHAIN_FILE`
value. This is allowed in preset files specifying version ``3`` or above.
``binaryDir``
An optional string representing the path to the output binary directory.

View File

@@ -87,6 +87,10 @@
"type": "string",
"description": "An optional string representing the generator to use for the preset. If generator is not specified, the normal generator discovery procedure is used. Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead."
},
"toolchainFile": {
"type": "string",
"description": "An optional string representing the path to the toolchain file. This field supports macro expansion. If a relative path is specified, it is calculated relative to the build directory, and if not found, relative to the source directory."
},
"installDir": {
"type": "string",
"description": "An optional string representing the path to the installation directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory."
@@ -360,6 +364,7 @@
"generator": {},
"architecture": {},
"toolset": {},
"toolchainFile": {},
"binaryDir": {},
"installDir": {},
"cmakeExecutable": {},