2013-07-11 17:14:24 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2015-01-14 18:07:15 +01:00
|
|
|
** Copyright (C) 2015 The Qt Company Ltd.
|
|
|
|
|
** Contact: http://www.qt.io/licensing
|
2013-07-11 17:14:24 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2015-01-14 18:07:15 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms and
|
|
|
|
|
** conditions see http://www.qt.io/terms-conditions. For further information
|
2014-10-01 13:21:18 +02:00
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2013-07-11 17:14:24 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2013-07-11 17:14:24 +02:00
|
|
|
**
|
2015-01-14 18:07:15 +01:00
|
|
|
** In addition, as a special exception, The Qt Company gives you certain additional
|
|
|
|
|
** rights. These rights are described in The Qt Company LGPL Exception
|
2013-07-11 17:14:24 +02:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "defaultpropertyprovider.h"
|
2013-07-23 14:13:26 +03:00
|
|
|
#include "qbsconstants.h"
|
2013-07-11 17:14:24 +02:00
|
|
|
|
2015-07-28 13:12:45 -07:00
|
|
|
#include <projectexplorer/abi.h>
|
2013-07-11 17:14:24 +02:00
|
|
|
#include <projectexplorer/kit.h>
|
|
|
|
|
#include <projectexplorer/kitinformation.h>
|
|
|
|
|
#include <projectexplorer/toolchain.h>
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2015-07-28 13:12:45 -07:00
|
|
|
|
2015-02-24 11:33:57 +01:00
|
|
|
#include <utils/hostosinfo.h>
|
2013-07-11 17:14:24 +02:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
|
2014-10-07 13:24:44 +02:00
|
|
|
#include <qbs.h>
|
2014-07-21 02:28:34 -04:00
|
|
|
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
#include <ios/iosconstants.h>
|
|
|
|
|
#include <qnx/qnxconstants.h>
|
|
|
|
|
#include <winrt/winrtconstants.h>
|
|
|
|
|
|
2014-07-21 02:55:43 -04:00
|
|
|
#include <QDir>
|
2013-07-11 17:14:24 +02:00
|
|
|
#include <QFileInfo>
|
2014-09-28 16:44:43 -04:00
|
|
|
#include <QSettings>
|
2013-07-11 17:14:24 +02:00
|
|
|
|
|
|
|
|
namespace QbsProjectManager {
|
2013-07-23 14:13:26 +03:00
|
|
|
using namespace Constants;
|
2014-11-24 17:38:22 +01:00
|
|
|
|
|
|
|
|
namespace Internal {
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
using namespace ProjectExplorer::Constants;
|
|
|
|
|
using namespace Ios::Constants;
|
|
|
|
|
using namespace Qnx::Constants;
|
|
|
|
|
using namespace WinRt::Internal::Constants;
|
2013-07-11 17:14:24 +02:00
|
|
|
|
2014-04-25 15:21:18 +02:00
|
|
|
static QString extractToolchainPrefix(QString *compilerName)
|
|
|
|
|
{
|
|
|
|
|
QString prefix;
|
|
|
|
|
if (compilerName->endsWith(QLatin1String("-g++"))
|
2015-04-16 00:24:06 +03:00
|
|
|
|| compilerName->endsWith(QLatin1String("-clang++"))
|
|
|
|
|
|| compilerName->endsWith(QLatin1String("-gcc"))
|
|
|
|
|
|| compilerName->endsWith(QLatin1String("-clang"))) {
|
2014-04-25 15:21:18 +02:00
|
|
|
const int idx = compilerName->lastIndexOf(QLatin1Char('-')) + 1;
|
|
|
|
|
prefix = compilerName->left(idx);
|
|
|
|
|
compilerName->remove(0, idx);
|
|
|
|
|
}
|
|
|
|
|
return prefix;
|
|
|
|
|
}
|
|
|
|
|
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
static QStringList targetOSList(const ProjectExplorer::Abi &abi, const ProjectExplorer::Kit *k)
|
|
|
|
|
{
|
|
|
|
|
const Core::Id device = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(k);
|
|
|
|
|
QStringList os;
|
|
|
|
|
switch (abi.os()) {
|
|
|
|
|
case ProjectExplorer::Abi::WindowsOS:
|
|
|
|
|
if (device == WINRT_DEVICE_TYPE_LOCAL ||
|
|
|
|
|
device == WINRT_DEVICE_TYPE_PHONE ||
|
|
|
|
|
device == WINRT_DEVICE_TYPE_EMULATOR) {
|
|
|
|
|
os << QLatin1String("winrt");
|
|
|
|
|
} else if (abi.osFlavor() == ProjectExplorer::Abi::WindowsCEFlavor) {
|
|
|
|
|
os << QLatin1String("windowsce");
|
|
|
|
|
}
|
|
|
|
|
os << QLatin1String("windows");
|
|
|
|
|
break;
|
|
|
|
|
case ProjectExplorer::Abi::MacOS:
|
|
|
|
|
if (device == DESKTOP_DEVICE_TYPE)
|
|
|
|
|
os << QLatin1String("osx");
|
|
|
|
|
else if (device == IOS_DEVICE_TYPE)
|
|
|
|
|
os << QLatin1String("ios");
|
|
|
|
|
else if (device == IOS_SIMULATOR_TYPE)
|
|
|
|
|
os << QLatin1String("ios-simulator") << QLatin1String("ios");
|
|
|
|
|
os << QLatin1String("darwin") << QLatin1String("bsd") << QLatin1String("unix");
|
|
|
|
|
break;
|
|
|
|
|
case ProjectExplorer::Abi::LinuxOS:
|
|
|
|
|
if (abi.osFlavor() == ProjectExplorer::Abi::AndroidLinuxFlavor)
|
|
|
|
|
os << QLatin1String("android");
|
|
|
|
|
os << QLatin1String("linux") << QLatin1String("unix");
|
|
|
|
|
break;
|
|
|
|
|
case ProjectExplorer::Abi::BsdOS:
|
|
|
|
|
switch (abi.osFlavor()) {
|
|
|
|
|
case ProjectExplorer::Abi::FreeBsdFlavor:
|
|
|
|
|
os << QLatin1String("freebsd");
|
|
|
|
|
break;
|
|
|
|
|
case ProjectExplorer::Abi::NetBsdFlavor:
|
|
|
|
|
os << QLatin1String("netbsd");
|
|
|
|
|
break;
|
|
|
|
|
case ProjectExplorer::Abi::OpenBsdFlavor:
|
|
|
|
|
os << QLatin1String("openbsd");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
os << QLatin1String("bsd") << QLatin1String("unix");
|
|
|
|
|
break;
|
|
|
|
|
case ProjectExplorer::Abi::UnixOS:
|
2015-04-24 10:31:27 +02:00
|
|
|
if (device == QNX_QNX_OS_TYPE)
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
os << QLatin1String("qnx");
|
|
|
|
|
else if (abi.osFlavor() == ProjectExplorer::Abi::SolarisUnixFlavor)
|
|
|
|
|
os << QLatin1String("solaris");
|
|
|
|
|
os << QLatin1String("unix");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return os;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static QStringList toolchainList(const ProjectExplorer::ToolChain *tc)
|
|
|
|
|
{
|
|
|
|
|
QStringList list;
|
|
|
|
|
if (tc->type() == QLatin1String("clang"))
|
|
|
|
|
list << QLatin1String("clang") << QLatin1String("llvm") << QLatin1String("gcc");
|
|
|
|
|
else if (tc->type() == QLatin1String("gcc"))
|
|
|
|
|
list << QLatin1String("gcc"); // TODO: Detect llvm-gcc
|
|
|
|
|
else if (tc->type() == QLatin1String("mingw"))
|
|
|
|
|
list << QLatin1String("mingw") << QLatin1String("gcc");
|
|
|
|
|
else if (tc->type() == QLatin1String("msvc"))
|
|
|
|
|
list << QLatin1String("msvc");
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-31 14:51:55 +01:00
|
|
|
QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k,
|
|
|
|
|
const QVariantMap &defaultData) const
|
2013-07-11 17:14:24 +02:00
|
|
|
{
|
|
|
|
|
QTC_ASSERT(k, return defaultData);
|
2014-10-31 14:51:55 +01:00
|
|
|
QVariantMap data = autoGeneratedProperties(k, defaultData);
|
|
|
|
|
const QVariantMap customProperties = k->value(Core::Id(QBS_PROPERTIES_KEY_FOR_KITS)).toMap();
|
|
|
|
|
for (QVariantMap::ConstIterator it = customProperties.constBegin();
|
|
|
|
|
it != customProperties.constEnd(); ++it) {
|
|
|
|
|
data.insert(it.key(), it.value());
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplorer::Kit *k,
|
|
|
|
|
const QVariantMap &defaultData) const
|
|
|
|
|
{
|
2013-07-11 17:14:24 +02:00
|
|
|
QVariantMap data = defaultData;
|
2014-07-21 02:55:43 -04:00
|
|
|
|
|
|
|
|
const QString sysroot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toUserOutput();
|
2013-07-11 17:14:24 +02:00
|
|
|
if (ProjectExplorer::SysRootKitInformation::hasSysRoot(k))
|
2014-07-21 02:55:43 -04:00
|
|
|
data.insert(QLatin1String(QBS_SYSROOT), sysroot);
|
2013-07-11 17:14:24 +02:00
|
|
|
|
|
|
|
|
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
|
2014-08-20 14:11:46 +02:00
|
|
|
if (!tc)
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
|
|
ProjectExplorer::Abi targetAbi = tc->targetAbi();
|
|
|
|
|
if (targetAbi.architecture() != ProjectExplorer::Abi::UnknownArchitecture) {
|
|
|
|
|
QString architecture = ProjectExplorer::Abi::toString(targetAbi.architecture());
|
|
|
|
|
|
|
|
|
|
// We have to be conservative tacking on suffixes to arch names because an arch that is
|
|
|
|
|
// already 64-bit may get an incorrect name as a result (i.e. Itanium)
|
|
|
|
|
if (targetAbi.wordWidth() == 64) {
|
|
|
|
|
switch (targetAbi.architecture()) {
|
|
|
|
|
case ProjectExplorer::Abi::X86Architecture:
|
2014-08-29 14:00:18 +02:00
|
|
|
architecture.append(QLatin1Char('_'));
|
2014-08-20 14:11:46 +02:00
|
|
|
// fall through
|
|
|
|
|
case ProjectExplorer::Abi::ArmArchitecture:
|
|
|
|
|
case ProjectExplorer::Abi::MipsArchitecture:
|
|
|
|
|
case ProjectExplorer::Abi::PowerPCArchitecture:
|
|
|
|
|
architecture.append(QString::number(targetAbi.wordWidth()));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
2014-07-21 02:28:34 -04:00
|
|
|
}
|
2014-08-20 14:11:46 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-14 15:36:16 +02:00
|
|
|
data.insert(QLatin1String(QBS_ARCHITECTURE), qbs::canonicalArchitecture(architecture));
|
2014-08-20 14:11:46 +02:00
|
|
|
}
|
2014-07-21 02:28:34 -04:00
|
|
|
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
QStringList targetOS = targetOSList(targetAbi, k);
|
|
|
|
|
if (!targetOS.isEmpty())
|
2014-08-20 14:11:46 +02:00
|
|
|
data.insert(QLatin1String(QBS_TARGETOS), targetOS);
|
2013-07-11 17:14:24 +02:00
|
|
|
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
QStringList toolchain = toolchainList(tc);
|
|
|
|
|
if (!toolchain.isEmpty())
|
|
|
|
|
data.insert(QLatin1String(QBS_TOOLCHAIN), toolchain);
|
2014-07-21 02:55:43 -04:00
|
|
|
|
Qbs: refactor property provider.
Set toolchain list centrally.
Set target OS for additional operating systems: WinRT, Windows CE,
Android, FreeBSD, NetBSD, OpenBSD, BSD (generic), BlackBerry, QNX,
and Solaris.
No more "else assumptions" which would for example detect Clang on
Windows as MSVC, any non-Clang toolchains as GCC, or any unrecognized
operating systems as Unix.
bsd4 is gone as it is not necessary in any practical sense (and no other
operating systems have different identifiers by version -- there is a
dedicated hostOSVersion property anyways).
Detect iOS without relying on Qt.
Change-Id: I38e2adf188d4604182ec84003dc5d281fce025cc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-09-28 14:43:54 -04:00
|
|
|
if (targetAbi.os() == ProjectExplorer::Abi::MacOS) {
|
2014-08-20 14:11:46 +02:00
|
|
|
// Set Xcode SDK name and version - required by Qbs if a sysroot is present
|
|
|
|
|
// Ideally this would be done in a better way...
|
2014-09-28 16:44:43 -04:00
|
|
|
const QRegExp sdkNameRe(QLatin1String("(macosx|iphoneos|iphonesimulator)([0-9]+\\.[0-9]+)"));
|
|
|
|
|
const QRegExp sdkVersionRe(QLatin1String("([0-9]+\\.[0-9]+)"));
|
|
|
|
|
QDir sysrootdir(sysroot);
|
|
|
|
|
const QSettings sdkSettings(sysrootdir.absoluteFilePath(QLatin1String("SDKSettings.plist")), QSettings::NativeFormat);
|
|
|
|
|
const QString sdkName(sdkSettings.value(QLatin1String("CanonicalName")).toString());
|
|
|
|
|
const QString sdkVersion(sdkSettings.value(QLatin1String("Version")).toString());
|
|
|
|
|
if (sdkNameRe.exactMatch(sdkName) && sdkVersionRe.exactMatch(sdkVersion)) {
|
|
|
|
|
for (int i = 3; i > 0; --i)
|
|
|
|
|
sysrootdir.cdUp();
|
|
|
|
|
data.insert(QLatin1String(CPP_PLATFORMPATH), sysrootdir.absolutePath());
|
|
|
|
|
data.insert(QLatin1String(CPP_XCODESDKNAME), sdkName);
|
|
|
|
|
data.insert(QLatin1String(CPP_XCODESDKVERSION), sdkVersion);
|
2013-07-11 17:14:24 +02:00
|
|
|
}
|
|
|
|
|
}
|
2014-08-20 14:11:46 +02:00
|
|
|
|
|
|
|
|
Utils::FileName cxx = tc->compilerCommand();
|
|
|
|
|
const QFileInfo cxxFileInfo = cxx.toFileInfo();
|
|
|
|
|
QString compilerName = cxxFileInfo.fileName();
|
|
|
|
|
const QString toolchainPrefix = extractToolchainPrefix(&compilerName);
|
|
|
|
|
if (!toolchainPrefix.isEmpty())
|
|
|
|
|
data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix);
|
|
|
|
|
data.insert(QLatin1String(CPP_COMPILERNAME), compilerName);
|
|
|
|
|
if (targetAbi.os() != ProjectExplorer::Abi::WindowsOS
|
|
|
|
|
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
|
|
|
|
data.insert(QLatin1String(CPP_LINKERNAME), compilerName);
|
|
|
|
|
}
|
|
|
|
|
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
|
2015-02-24 11:33:57 +01:00
|
|
|
|
|
|
|
|
QVariantMap m;
|
|
|
|
|
if (toolchain.contains(QLatin1String("clang"))) {
|
|
|
|
|
m[QLatin1String("c")] = m[QLatin1String("objc")] = QLatin1String("clang");
|
|
|
|
|
m[QLatin1String("cpp")] = m[QLatin1String("objcpp")] = QLatin1String("clang++");
|
|
|
|
|
} else if (toolchain.contains(QLatin1String("gcc"))) {
|
|
|
|
|
m[QLatin1String("c")] = m[QLatin1String("objc")] = QLatin1String("gcc");
|
|
|
|
|
m[QLatin1String("cpp")] = m[QLatin1String("objcpp")] = QLatin1String("g++");
|
|
|
|
|
}
|
|
|
|
|
const QString fullPrefix = cxxFileInfo.absolutePath() + QLatin1Char('/') + toolchainPrefix;
|
|
|
|
|
for (auto it = m.begin(); it != m.end();) {
|
|
|
|
|
const QString filePath = Utils::HostOsInfo::withExecutableSuffix(fullPrefix
|
|
|
|
|
+ it.value().toString());
|
|
|
|
|
if (QFile::exists(filePath)) {
|
|
|
|
|
it.value() = filePath;
|
|
|
|
|
++it;
|
|
|
|
|
} else {
|
|
|
|
|
it = m.erase(it);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!m.isEmpty())
|
|
|
|
|
data.insert(QLatin1String(CPP_COMPILERPATHBYLANGUAGE), m);
|
|
|
|
|
|
2015-06-12 11:30:43 +02:00
|
|
|
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|
|
|
|
|
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
|
2014-08-20 14:11:46 +02:00
|
|
|
const QLatin1String flags("/FS");
|
|
|
|
|
data.insert(QLatin1String(CPP_PLATFORMCFLAGS), flags);
|
|
|
|
|
data.insert(QLatin1String(CPP_PLATFORMCXXFLAGS), flags);
|
|
|
|
|
}
|
2013-07-11 17:14:24 +02:00
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-24 17:38:22 +01:00
|
|
|
} // namespace Internal
|
2013-07-11 17:14:24 +02:00
|
|
|
} // namespace QbsProjectManager
|