forked from qt-creator/qt-creator
CMake: Set the correct build system target to the project part
The internal build target key had changed again. Adapt and use a more error proof pattern to be hopefully safe if it may change again. The wrong build target key led inside the AutoTest plugin to a wrong comparison of build target of the project parts vs. the build target of the run configuration which in turn ended up in always deducing the run configuration for the test runner. Change-Id: I32df578df85cc0206c2b8fdac00acc3a798f0d73 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -382,7 +382,7 @@ CppTools::RawProjectParts ServerModeReader::createRawProjectParts() const
|
||||
|
||||
CppTools::RawProjectPart rpp;
|
||||
rpp.setProjectFileLocation(fg->target->sourceDirectory.toString() + "/CMakeLists.txt");
|
||||
rpp.setBuildSystemTarget(fg->target->name + QChar('\n') + fg->target->sourceDirectory.toString() + QChar('/'));
|
||||
rpp.setBuildSystemTarget(CMakeTargetNode::generateId(fg->target->sourceDirectory, fg->target->name));
|
||||
rpp.setDisplayName(fg->target->name + QString::number(counter));
|
||||
rpp.setMacros(fg->macros);
|
||||
rpp.setIncludePaths(includes);
|
||||
|
||||
@@ -370,7 +370,7 @@ CppTools::RawProjectParts TeaLeafReader::createRawProjectParts() const
|
||||
includePaths += m_parameters.workDirectory.toString();
|
||||
CppTools::RawProjectPart rpp;
|
||||
rpp.setProjectFileLocation(cbt.sourceDirectory.toString() + "/CMakeLists.txt");
|
||||
rpp.setBuildSystemTarget(cbt.title + QChar('\n') + cbt.sourceDirectory.toString() + QChar('/'));
|
||||
rpp.setBuildSystemTarget(CMakeTargetNode::generateId(cbt.sourceDirectory, cbt.title));
|
||||
rpp.setIncludePaths(includePaths);
|
||||
|
||||
CppTools::RawProjectPartFlags cProjectFlags;
|
||||
|
||||
Reference in New Issue
Block a user