forked from qt-creator/qt-creator
CMake/qmake: Fix target triple for iOS targets
Neither cmake nor qmake know the full iOS compiler command line, so we have to construct the target triple for the code model ourselves. Fixes: QTCREATORBUG-28278 Change-Id: I6cac06f340e9388de5c86509a8df4ac00eef87cd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -607,24 +607,24 @@ void CMakeBuildSystem::updateProjectData()
|
||||
setError(errorMessage);
|
||||
qCDebug(cmakeBuildSystemLog) << "Raw project parts created." << errorMessage;
|
||||
|
||||
{
|
||||
for (RawProjectPart &rpp : rpps) {
|
||||
rpp.setQtVersion(
|
||||
kitInfo.projectPartQtVersion); // TODO: Check if project actually uses Qt.
|
||||
const QString includeFileBaseDir = buildConfiguration()->buildDirectory().toString();
|
||||
if (kitInfo.cxxToolChain) {
|
||||
rpp.setFlagsForCxx({kitInfo.cxxToolChain, rpp.flagsForCxx.commandLineFlags,
|
||||
includeFileBaseDir});
|
||||
}
|
||||
if (kitInfo.cToolChain) {
|
||||
rpp.setFlagsForC({kitInfo.cToolChain, rpp.flagsForC.commandLineFlags,
|
||||
includeFileBaseDir});
|
||||
}
|
||||
}
|
||||
|
||||
m_cppCodeModelUpdater->update({p, kitInfo, buildConfiguration()->environment(), rpps},
|
||||
m_extraCompilers);
|
||||
for (RawProjectPart &rpp : rpps) {
|
||||
rpp.setQtVersion(
|
||||
kitInfo.projectPartQtVersion); // TODO: Check if project actually uses Qt.
|
||||
const QString includeFileBaseDir = buildConfiguration()->buildDirectory().toString();
|
||||
QStringList cxxFlags = rpp.flagsForCxx.commandLineFlags;
|
||||
QStringList cFlags = rpp.flagsForC.commandLineFlags;
|
||||
addTargetFlagForIos(cxxFlags, cFlags, this, [this] {
|
||||
return m_configurationFromCMake.stringValueOf("CMAKE_OSX_DEPLOYMENT_TARGET");
|
||||
});
|
||||
if (kitInfo.cxxToolChain)
|
||||
rpp.setFlagsForCxx({kitInfo.cxxToolChain, cxxFlags, includeFileBaseDir});
|
||||
if (kitInfo.cToolChain)
|
||||
rpp.setFlagsForC({kitInfo.cToolChain, cFlags, includeFileBaseDir});
|
||||
}
|
||||
|
||||
m_cppCodeModelUpdater->update({p, kitInfo, buildConfiguration()->environment(), rpps},
|
||||
m_extraCompilers);
|
||||
|
||||
{
|
||||
const bool mergedHeaderPathsAndQmlImportPaths = kit()->value(
|
||||
QtSupport::KitHasMergedHeaderPathsWithQmlImportPaths::id(), false).toBool();
|
||||
|
||||
Reference in New Issue
Block a user