mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmake-presets: Introduce toolchainFile preset option
In v3 of the presets, the `--toolchain` command line argument now has a preset mapping.
This commit is contained in:
@@ -491,6 +491,8 @@ auto const ConfigurePresetHelper =
|
||||
false)
|
||||
.Bind("architecture"_s, ArchitectureHelper, false)
|
||||
.Bind("toolset"_s, ToolsetHelper, false)
|
||||
.Bind("toolchainFile"_s, &ConfigurePreset::ToolchainFile,
|
||||
PresetStringHelper, false)
|
||||
.Bind("binaryDir"_s, &ConfigurePreset::BinaryDir, PresetStringHelper,
|
||||
false)
|
||||
.Bind("installDir"_s, &ConfigurePreset::InstallDir, PresetStringHelper,
|
||||
@@ -973,6 +975,11 @@ cmCMakePresetsFile::ReadFileResult cmCMakePresetsFile::ReadJSONFile(
|
||||
return ReadFileResult::CONDITION_UNSUPPORTED;
|
||||
}
|
||||
|
||||
// Support for toolchainFile presets added in version 3.
|
||||
if (v < 3 && !preset.ToolchainFile.empty()) {
|
||||
return ReadFileResult::TOOLCHAIN_FILE_UNSUPPORTED;
|
||||
}
|
||||
|
||||
this->ConfigurePresetOrder.push_back(preset.Name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user