pass --sysroot to compile tests also on windows
Change-Id: I486059197479842f32c3590d7fd269550d22698e Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
ae496a0ea6
commit
ffd44acd0d
@ -3089,6 +3089,15 @@ void Configure::generateCachefile()
|
||||
}
|
||||
}
|
||||
|
||||
void Configure::addSysroot(QString *command)
|
||||
{
|
||||
const QString &sysroot = dictionary["CFG_SYSROOT"];
|
||||
if (!sysroot.isEmpty() && dictionary["CFG_GCC_SYSROOT"] == "yes") {
|
||||
command->append(" QMAKE_LFLAGS+=--sysroot=" + sysroot);
|
||||
command->append(" QMAKE_CXXFLAGS+=--sysroot=" + sysroot);
|
||||
}
|
||||
}
|
||||
|
||||
struct ArchData {
|
||||
bool isHost;
|
||||
const char *qmakespec;
|
||||
@ -3142,6 +3151,7 @@ void Configure::detectArch()
|
||||
if (!data.isHost) {
|
||||
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
|
||||
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
|
||||
addSysroot(&command);
|
||||
}
|
||||
|
||||
int returnValue = 0;
|
||||
@ -3249,6 +3259,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
|
||||
const QString qmakespec = dictionary["XQMAKESPEC"];
|
||||
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
|
||||
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
|
||||
addSysroot(&command);
|
||||
}
|
||||
|
||||
int code = 0;
|
||||
|
@ -169,6 +169,7 @@ private:
|
||||
void reloadCmdLine();
|
||||
void saveCmdLine();
|
||||
|
||||
void addSysroot(QString *command);
|
||||
bool tryCompileProject(const QString &projectPath, const QString &extraOptions = QString());
|
||||
bool compilerSupportsFlag(const QString &compilerAndArgs);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user