2016-01-13 14:12:15 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2016-01-13 14:12:15 +01: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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2016-01-13 14:12:15 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2016-01-13 14:12:15 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
2016-01-13 14:32:28 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2016-01-13 14:12:15 +01:00
|
|
|
|
|
|
|
|
#include "cpptools_global.h"
|
|
|
|
|
|
|
|
|
|
#include "cppprojectfile.h"
|
|
|
|
|
#include "projectpartheaderpath.h"
|
|
|
|
|
|
2016-01-18 11:56:54 +01:00
|
|
|
#include <projectexplorer/projectexplorer_global.h>
|
2016-01-13 14:12:15 +01:00
|
|
|
|
|
|
|
|
#include <coreplugin/id.h>
|
|
|
|
|
|
|
|
|
|
#include <cplusplus/Token.h>
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QSharedPointer>
|
|
|
|
|
|
|
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
class Project;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace CppTools {
|
|
|
|
|
|
|
|
|
|
class CPPTOOLS_EXPORT ProjectPart
|
|
|
|
|
{
|
2016-12-05 16:08:01 +01:00
|
|
|
public:
|
2016-01-13 14:12:15 +01:00
|
|
|
enum LanguageVersion {
|
|
|
|
|
C89,
|
|
|
|
|
C99,
|
|
|
|
|
C11,
|
2016-12-05 15:38:38 +01:00
|
|
|
LatestCVersion = C11,
|
2016-01-13 14:12:15 +01:00
|
|
|
CXX98,
|
|
|
|
|
CXX03,
|
|
|
|
|
CXX11,
|
|
|
|
|
CXX14,
|
2016-12-05 15:24:09 +01:00
|
|
|
CXX17,
|
2016-12-05 15:38:38 +01:00
|
|
|
LatestCxxVersion = CXX17,
|
2016-01-13 14:12:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum LanguageExtension {
|
|
|
|
|
NoExtensions = 0,
|
|
|
|
|
GnuExtensions = 1 << 0,
|
|
|
|
|
MicrosoftExtensions = 1 << 1,
|
|
|
|
|
BorlandExtensions = 1 << 2,
|
|
|
|
|
OpenMPExtensions = 1 << 3,
|
|
|
|
|
ObjectiveCExtensions = 1 << 4,
|
|
|
|
|
|
2016-12-05 16:08:01 +01:00
|
|
|
AllExtensions = GnuExtensions
|
|
|
|
|
| MicrosoftExtensions
|
|
|
|
|
| BorlandExtensions
|
|
|
|
|
| OpenMPExtensions
|
2016-01-13 14:12:15 +01:00
|
|
|
| ObjectiveCExtensions
|
|
|
|
|
};
|
|
|
|
|
Q_DECLARE_FLAGS(LanguageExtensions, LanguageExtension)
|
|
|
|
|
|
|
|
|
|
enum QtVersion {
|
|
|
|
|
UnknownQt = -1,
|
2016-12-05 16:08:01 +01:00
|
|
|
NoQt,
|
2017-08-17 09:31:16 +02:00
|
|
|
Qt4_8_6AndOlder,
|
|
|
|
|
Qt4Latest,
|
2016-12-05 16:08:01 +01:00
|
|
|
Qt5
|
2016-01-13 14:12:15 +01:00
|
|
|
};
|
|
|
|
|
|
2016-10-17 17:15:15 +02:00
|
|
|
enum ToolChainWordWidth {
|
|
|
|
|
WordWidth32Bit,
|
|
|
|
|
WordWidth64Bit,
|
|
|
|
|
};
|
|
|
|
|
|
2016-01-13 14:12:15 +01:00
|
|
|
using Ptr = QSharedPointer<ProjectPart>;
|
|
|
|
|
|
2016-12-05 16:08:01 +01:00
|
|
|
public:
|
|
|
|
|
QString id() const;
|
2017-03-09 14:13:22 +01:00
|
|
|
QString projectFileLocation() const;
|
2016-01-13 14:12:15 +01:00
|
|
|
|
|
|
|
|
Ptr copy() const;
|
2016-12-05 16:08:01 +01:00
|
|
|
void updateLanguageFeatures();
|
2016-01-13 14:12:15 +01:00
|
|
|
|
2016-12-05 16:08:01 +01:00
|
|
|
static QByteArray readProjectConfigFile(const Ptr &projectPart);
|
2016-01-13 14:12:15 +01:00
|
|
|
|
2016-12-05 16:08:01 +01:00
|
|
|
public:
|
|
|
|
|
ProjectExplorer::Project *project = nullptr;
|
2016-01-13 14:12:15 +01:00
|
|
|
|
|
|
|
|
QString displayName;
|
2016-12-05 16:08:01 +01:00
|
|
|
|
2016-01-13 14:12:15 +01:00
|
|
|
QString projectFile;
|
2017-02-27 14:02:38 +01:00
|
|
|
int projectFileLine = -1;
|
|
|
|
|
int projectFileColumn = -1;
|
2016-01-13 14:12:15 +01:00
|
|
|
QString projectConfigFile; // currently only used by the Generic Project Manager
|
2017-02-27 14:37:41 +01:00
|
|
|
QString callGroupId;
|
2017-02-27 14:46:45 +01:00
|
|
|
QString buildSystemTarget;
|
2016-12-05 16:08:01 +01:00
|
|
|
|
|
|
|
|
ProjectFiles files;
|
|
|
|
|
|
2016-01-13 14:12:15 +01:00
|
|
|
QStringList precompiledHeaders;
|
2016-12-05 16:08:01 +01:00
|
|
|
ProjectPartHeaderPaths headerPaths;
|
|
|
|
|
|
|
|
|
|
QByteArray projectDefines;
|
|
|
|
|
|
|
|
|
|
LanguageVersion languageVersion = LatestCxxVersion;
|
|
|
|
|
LanguageExtensions languageExtensions = NoExtensions;
|
|
|
|
|
ProjectExplorer::WarningFlags warningFlags = ProjectExplorer::WarningFlags::Default;
|
|
|
|
|
QtVersion qtVersion = UnknownQt;
|
2016-01-13 14:12:15 +01:00
|
|
|
CPlusPlus::LanguageFeatures languageFeatures;
|
2016-12-05 16:08:01 +01:00
|
|
|
|
|
|
|
|
bool selectedForBuilding = true;
|
|
|
|
|
|
|
|
|
|
Core::Id toolchainType;
|
|
|
|
|
bool isMsvc2015Toolchain = false;
|
|
|
|
|
QByteArray toolchainDefines;
|
|
|
|
|
ToolChainWordWidth toolChainWordWidth = WordWidth32Bit;
|
|
|
|
|
QString toolChainTargetTriple;
|
2016-01-13 14:12:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace CppTools
|