CMake: Work-around first config argument getting skipped by cmake

Work-around the first configure argument getting ignored by cmake 3.7.0
and CMake 3.7.1.

Change-Id: Iaf164cbf973672c1d899738a374c65ea5641132c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2016-12-01 12:14:46 +01:00
parent 63c0fbc4e4
commit e545f8a105

View File

@@ -145,10 +145,13 @@ void ServerModeReader::parse(bool force)
QTC_ASSERT(m_cmakeServer, return);
QVariantMap extra;
if (force) {
extra.insert("cacheArguments", QVariant(transform(m_parameters.configuration,
[this](const CMakeConfigItem &i) {
QStringList cacheArguments = transform(m_parameters.configuration,
[this](const CMakeConfigItem &i) {
return i.toArgument(m_parameters.expander);
})));
});
cacheArguments.prepend(QString()); // Work around a bug in CMake 3.7.0 and 3.7.1 where
// the first argument gets lost!
extra.insert("cacheArguments", QVariant(cacheArguments));
}
m_future.reset(new QFutureInterface<void>());