move preparation of configure test build dir to qmake-based system

Change-Id: I650fb92cfa858bf6d7ff5756aa0efe182f036a55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2016-11-17 19:24:35 +01:00
parent 80e63223f8
commit 2dcc1a8e46
5 changed files with 1 additions and 31 deletions

5
configure vendored
View File

@ -452,11 +452,6 @@ fi
# initalize variables
#-------------------------------------------------------------------------------
# Use CC/CXX to run config.tests
mkdir -p "$outpath/config.tests"
rm -f "$outpath/config.tests/.qmake.cache"
: > "$outpath/config.tests/.qmake.cache"
# QTDIR may be set and point to an old or system-wide Qt installation
unset QTDIR

View File

@ -770,6 +770,7 @@ defineTest(qtConfTest_compile) {
QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE"
mkpath($$test_out_dir)|error()
write_file($$test_out_dir/.qmake.cache)|error()
# add possible command line args
qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args)

View File

@ -93,7 +93,6 @@ Configure::Configure(int& argc, char** argv)
QDir(buildPath).mkpath("bin");
buildDir.mkpath("mkspecs");
buildDir.mkpath("config.tests");
}
dictionary[ "QT_INSTALL_PREFIX" ] = installPath;
@ -479,25 +478,6 @@ void Configure::parseCmdLine()
}
}
void Configure::prepareConfigTests()
{
// Generate an empty .qmake.cache file for config.tests
QDir buildDir(buildPath);
bool success = true;
if (!buildDir.exists("config.tests"))
success = buildDir.mkdir("config.tests");
QString fileName(buildPath + "/config.tests/.qmake.cache");
QFile cacheFile(fileName);
success &= cacheFile.open(QIODevice::WriteOnly);
cacheFile.close();
if (!success) {
cout << "Failed to create file " << qPrintable(QDir::toNativeSeparators(fileName)) << endl;
dictionary[ "DONE" ] = "error";
}
}
void Configure::generateQDevicePri()
{
FileWriter deviceStream(buildPath + "/mkspecs/qdevice.pri");

View File

@ -52,7 +52,6 @@ public:
void generateHeaders();
void generateQDevicePri();
void prepareConfigTests();
bool isDone();
bool isOk();

View File

@ -63,11 +63,6 @@ int runConfigure( int argc, char** argv )
if (!app.isOk())
return 3;
// Prepare the config test build directory.
app.prepareConfigTests();
if (!app.isOk())
return 3;
// run qmake based configure
app.configure();
if (!app.isOk())