From 70cecb52a45dba223030288e73461d51bfa647dd Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 23 Jan 2014 12:09:11 +0100 Subject: [PATCH] qmakeprojectmanager: check .pro file when building A .pro file mismatch between the generated Makefile and what should be generated was checked only at import. Always check that (ant thus warn ifs one ends up in that situation) Change-Id: I73436845ec82d6598ab13f446c655b644c0e6b3f Reviewed-by: Daniel Teske --- .../qmakeprojectmanager/qmakebuildconfiguration.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index aaa024829d9..a5e79be2d66 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -341,6 +341,14 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit()); if (!version) return MakefileForWrongProject; + if (QtSupport::QtVersionManager::makefileIsFor(makefile, qs->project()->projectFilePath()) + != QtSupport::QtVersionManager::SameProject) { + if (debug) { + qDebug() << "different profile used to generate the Makefile:" + << makefile << " expected profile:" << qs->project()->projectFilePath(); + } + return MakefileIncompatible; + } if (version->qmakeCommand() == qmakePath) { // same qtversion QPair result =