forked from qt-creator/qt-creator
CMakePM: Allow presets without buildDirectory
CMakePresets v3 relax the requirement of having the buildDirectory specified. This way Qt Creator should use its own mechanism of specifying the build directory. Change-Id: I6ba69e6a03cdc058e7b8fa540a6fc564356aba63 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1956,19 +1956,8 @@ CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory()
|
||||
|
||||
// Skip the default shadow build directories for build types if we have presets
|
||||
const CMakeConfigItem presetItem = CMakeConfigurationKitAspect::cmakePresetConfigItem(k);
|
||||
if (!presetItem.isNull()) {
|
||||
const QString presetName = presetItem.expandedValue(k);
|
||||
const auto project = qobject_cast<CMakeProject *>(SessionManager::startupProject());
|
||||
|
||||
PresetsDetails::ConfigurePreset configurePreset
|
||||
= Utils::findOrDefault(project->presetsData().configurePresets,
|
||||
[&presetName] (const PresetsDetails::ConfigurePreset &preset) {
|
||||
return preset.name == presetName;
|
||||
});
|
||||
|
||||
if (configurePreset.binaryDir)
|
||||
return result;
|
||||
}
|
||||
if (!presetItem.isNull())
|
||||
return result;
|
||||
|
||||
for (int type = BuildTypeDebug; type != BuildTypeLast; ++type) {
|
||||
BuildInfo info = createBuildInfo(BuildType(type));
|
||||
|
||||
Reference in New Issue
Block a user