forked from qt-creator/qt-creator
CMakePM: Fix duplicated CMake presets kits
QTC_KIT_DEFAULT_CONFIG_HASH was introduced in order to match the previous CMake presets kits. This would hash the Qt and the C/C++ compiler paths. Unfortunately on Linux CMake would pick "cc" and "c++" by default, whilst Qt Creator uses "gcc" and "g++". The compilers would match from the Qt Creator point of view, but the hash values would be different. On mac there is a similar issue with compiler launchers. This patchset fixes this by removing the hash and fixes also the issue of allowing broken CMake presets kits (without any compilers), which were the reason for introducing the hash key in the first place. Fixes: QTCREATORBUG-29075 Change-Id: Id8dc081febba7bc7023c98055afc6ebfcdc55542 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1182,12 +1182,6 @@ static void addCMakeConfigurePresetToInitialArguments(QStringList &initialArgume
|
||||
initialArguments.removeIf(
|
||||
[presetArgument](const QString &item) { return item == presetArgument; });
|
||||
|
||||
// Remove the -DQTC_KIT_DEFAULT_CONFIG_HASH argument
|
||||
const QString presetHashArgument
|
||||
= CMakeConfigurationKitAspect::kitDefaultConfigHashItem(k).toArgument();
|
||||
initialArguments.removeIf(
|
||||
[presetHashArgument](const QString &item) { return item == presetHashArgument; });
|
||||
|
||||
PresetsDetails::ConfigurePreset configurePreset
|
||||
= Utils::findOrDefault(project->presetsData().configurePresets,
|
||||
[presetName](const PresetsDetails::ConfigurePreset &preset) {
|
||||
|
||||
Reference in New Issue
Block a user