qmake/xcode: Do not create OBJECTS_DIR
If we create OBJECTS_DIR at qmake time, Xcode will not consider this directory as created by the build system, and "xcodebuild --clean" will fail. Prevent qmake from creating that directory in the Xcode generator. Pick-to: 5.15 6.2 Fixes: QTBUG-96305 Change-Id: I874bf34a4289ce5f2d3e2ce070ffbe56d5368861 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
296621a52f
commit
b5a23e88be
@ -2073,4 +2073,10 @@ ProjectBuilderMakefileGenerator::writeSettings(const QString &var, const ProStri
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ProjectBuilderMakefileGenerator::inhibitMakeDirOutPath(const ProKey &path) const
|
||||||
|
{
|
||||||
|
return path == "OBJECTS_DIR";
|
||||||
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -66,6 +66,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
bool doPrecompiledHeaders() const override { return false; }
|
bool doPrecompiledHeaders() const override { return false; }
|
||||||
bool doDepends() const override { return writingUnixMakefileGenerator && UnixMakefileGenerator::doDepends(); }
|
bool doDepends() const override { return writingUnixMakefileGenerator && UnixMakefileGenerator::doDepends(); }
|
||||||
|
bool inhibitMakeDirOutPath(const ProKey &path) const override;
|
||||||
};
|
};
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
@ -173,6 +173,9 @@ MakefileGenerator::initOutPaths()
|
|||||||
if (noIO() || (project->first("TEMPLATE") == "subdirs"))
|
if (noIO() || (project->first("TEMPLATE") == "subdirs"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (inhibitMakeDirOutPath(dkey))
|
||||||
|
continue;
|
||||||
|
|
||||||
QString path = project->first(dkey).toQString(); //not to be changed any further
|
QString path = project->first(dkey).toQString(); //not to be changed any further
|
||||||
path = fileFixify(path, FileFixifyBackwards);
|
path = fileFixify(path, FileFixifyBackwards);
|
||||||
debug_msg(3, "Fixed output_dir %s (%s) into %s", dirs[x],
|
debug_msg(3, "Fixed output_dir %s (%s) into %s", dirs[x],
|
||||||
@ -216,6 +219,18 @@ MakefileGenerator::initOutPaths()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For the given directory path, return true if MakefileGenerator::initOutPaths() should inhibit the
|
||||||
|
* creation of the directory. Overload this in subclasses.
|
||||||
|
*/
|
||||||
|
bool
|
||||||
|
MakefileGenerator::inhibitMakeDirOutPath(const ProKey &path) const
|
||||||
|
{
|
||||||
|
Q_UNUSED(path);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QMakeProject
|
QMakeProject
|
||||||
*MakefileGenerator::projectFile() const
|
*MakefileGenerator::projectFile() const
|
||||||
{
|
{
|
||||||
|
@ -160,6 +160,7 @@ protected:
|
|||||||
void verifyCompilers();
|
void verifyCompilers();
|
||||||
virtual void init();
|
virtual void init();
|
||||||
void initOutPaths();
|
void initOutPaths();
|
||||||
|
virtual bool inhibitMakeDirOutPath(const ProKey &path) const;
|
||||||
struct Compiler
|
struct Compiler
|
||||||
{
|
{
|
||||||
QString variable_in;
|
QString variable_in;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user