diff --git a/src/plugins/projectexplorer/buildtargetinfo.h b/src/plugins/projectexplorer/buildtargetinfo.h index 1da61b7d0f1..0aa5011dda1 100644 --- a/src/plugins/projectexplorer/buildtargetinfo.h +++ b/src/plugins/projectexplorer/buildtargetinfo.h @@ -48,6 +48,8 @@ public: bool isQtcRunnable = true; bool usesTerminal = false; + uint runEnvModifierHash = 0; // Make sure to update this when runEnvModifier changes! + std::function runEnvModifier; }; @@ -56,7 +58,11 @@ inline bool operator==(const BuildTargetInfo &ti1, const BuildTargetInfo &ti2) return ti1.buildKey == ti2.buildKey && ti1.displayName == ti2.displayName && ti1.targetFilePath == ti2.targetFilePath - && ti1.projectFilePath == ti2.projectFilePath; + && ti1.projectFilePath == ti2.projectFilePath + && ti1.workingDirectory == ti2.workingDirectory + && ti1.isQtcRunnable == ti2.isQtcRunnable + && ti1.usesTerminal == ti2.usesTerminal + && ti1.runEnvModifierHash == ti2.runEnvModifierHash; } inline bool operator!=(const BuildTargetInfo &ti1, const BuildTargetInfo &ti2) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 25477977806..0b7678c664e 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1097,6 +1097,7 @@ void QmakeProject::updateBuildSystemData() if (qtVersion) libraryPaths.append(qtVersion->librarySearchPath().toString()); + bti.runEnvModifierHash = qHash(libraryPaths); bti.runEnvModifier = [libraryPaths](Environment &env, bool useLibrarySearchPath) { if (useLibrarySearchPath) env.prependOrSetLibrarySearchPaths(libraryPaths);