From 579d0d3cadc646d56702cc65f6665dc9bd57aa1b Mon Sep 17 00:00:00 2001 From: Patrick Keil Date: Wed, 19 Apr 2023 19:32:42 +0200 Subject: [PATCH] Without outer bracket [] the kit will not be detected (#3099) * Without outer bracket [] the kit will not be detected Tested on windows. Without the outer main brackets, the cmake-kit will not be detected. --- docs/kits.md | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/kits.md b/docs/kits.md index e88fab343..e55cb00c6 100644 --- a/docs/kits.md +++ b/docs/kits.md @@ -73,26 +73,30 @@ To specify a compiler, list the path to the compiler in the `cmake-tools-kits.js The most common CMake languages are `C` and `CXX`, and CMake Tools has built-in support for finding these. However, any language can be specified: -```xml -{ - "name": "My Compiler Kit", - "compilers": { - "C": "/usr/bin/gcc", - "CXX": "/usr/bin/g++", - "Fortran": "/usr/bin/gfortran" +```json +[ + { + "name": "My Compiler Kit", + "compilers": { + "C": "/usr/bin/gcc", + "CXX": "/usr/bin/g++", + "Fortran": "/usr/bin/gfortran" + } } -} +] ``` ### Specify a toolchain CMake Tools doesn't automatically detect toolchains, but you can specify a CMake toolchain file in a kit, like this: -```xml -{ - "name": "Emscripten", - "toolchainFile": "/path/to/emscripten/toolchain.cmake" -} +```json +[ + { + "name": "Emscripten", + "toolchainFile": "/path/to/emscripten/toolchain.cmake" + } +] ``` CMake Tools will pass this path for `CMAKE_TOOLCHAIN_FILE` during configuration. @@ -101,12 +105,14 @@ CMake Tools will pass this path for `CMAKE_TOOLCHAIN_FILE` during configuration. CMake Tools automatically sets up the environment for working with Visual C++. It is best to let CMake Tools generate the kits first, then duplicate and modify them: -```xml -{ - "name": "A Visual Studio", - "visualStudio": "Visual Studio Build Tools 2017", - "visualStudioArchitecture": "amd64" -} +```json +[ + { + "name": "A Visual Studio", + "visualStudio": "Visual Studio Build Tools 2017", + "visualStudioArchitecture": "amd64" + } +] ``` Keys: