CMake: Simplify buildkey generation

Just use the target name as buildkey. This is unique in cmake projects, so
there is no need to mangle the source directory into the whole thing.

This is a problem since different readers might report different source
directories. That will then result in RunConfigurations getting duplicated
after switching the reader types.

Task-number: QTCREATORBUG-22129
Change-Id: I849ab68f221d732341e98faa9a4e757d3a495b2a
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-06-20 14:03:40 +02:00
parent add60c0148
commit 5bcd59c94f
8 changed files with 7 additions and 14 deletions

View File

@@ -206,7 +206,7 @@ const QList<BuildTargetInfo> CMakeBuildConfiguration::appTargets() const
bti.targetFilePath = ct.executable;
bti.projectFilePath = ct.sourceDirectory.stringAppended("/");
bti.workingDirectory = ct.workingDirectory;
bti.buildKey = CMakeTargetNode::generateId(ct.sourceDirectory, ct.title);
bti.buildKey = ct.title;
appTargetList.append(bti);
}
}