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"
|
|
|
|
|
|
2018-09-03 16:10:43 +02:00
|
|
|
#include <projectexplorer/headerpath.h>
|
2016-01-18 11:56:54 +01:00
|
|
|
#include <projectexplorer/projectexplorer_global.h>
|
2017-02-07 15:00:38 +01:00
|
|
|
#include <projectexplorer/projectmacro.h>
|
2016-01-13 14:12:15 +01:00
|
|
|
|
|
|
|
|
#include <coreplugin/id.h>
|
|
|
|
|
|
2019-01-09 18:31:20 +01:00
|
|
|
#include <utils/cpplanguage_details.h>
|
|
|
|
|
|
2016-01-13 14:12:15 +01:00
|
|
|
#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 QtVersion {
|
|
|
|
|
UnknownQt = -1,
|
2016-12-05 16:08:01 +01:00
|
|
|
NoQt,
|
2018-09-27 10:18:44 +02:00
|
|
|
Qt4,
|
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,
|
|
|
|
|
};
|
|
|
|
|
|
2017-08-29 12:11:27 +02:00
|
|
|
enum BuildTargetType {
|
|
|
|
|
Unknown,
|
|
|
|
|
Executable,
|
|
|
|
|
Library
|
|
|
|
|
};
|
|
|
|
|
|
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;
|
2017-02-27 14:37:41 +01:00
|
|
|
QString callGroupId;
|
2016-12-05 16:08:01 +01:00
|
|
|
|
2019-01-08 15:13:48 +01:00
|
|
|
// Versions, features and extensions
|
2019-01-15 13:45:48 +01:00
|
|
|
::Utils::LanguageVersion languageVersion = ::Utils::LanguageVersion::LatestCxx;
|
|
|
|
|
::Utils::LanguageExtensions languageExtensions = ::Utils::LanguageExtension::None;
|
2019-01-08 15:13:48 +01:00
|
|
|
CPlusPlus::LanguageFeatures languageFeatures;
|
|
|
|
|
QtVersion qtVersion = UnknownQt;
|
2016-12-05 16:08:01 +01:00
|
|
|
|
2019-01-08 15:13:48 +01:00
|
|
|
// Files
|
|
|
|
|
ProjectFiles files;
|
2016-01-13 14:12:15 +01:00
|
|
|
QStringList precompiledHeaders;
|
2018-09-03 16:10:43 +02:00
|
|
|
ProjectExplorer::HeaderPaths headerPaths;
|
2019-01-08 15:13:48 +01:00
|
|
|
QString projectConfigFile; // Generic Project Manager only
|
2016-12-05 16:08:01 +01:00
|
|
|
|
2019-01-08 15:13:48 +01:00
|
|
|
// Macros
|
2017-02-07 15:00:38 +01:00
|
|
|
ProjectExplorer::Macros projectMacros;
|
2019-01-08 15:13:48 +01:00
|
|
|
ProjectExplorer::Macros toolChainMacros;
|
2016-12-05 16:08:01 +01:00
|
|
|
|
2019-01-08 15:13:48 +01:00
|
|
|
// Build system
|
|
|
|
|
QString buildSystemTarget;
|
|
|
|
|
BuildTargetType buildTargetType = Unknown;
|
2016-12-05 16:08:01 +01:00
|
|
|
bool selectedForBuilding = true;
|
|
|
|
|
|
2019-01-08 15:13:48 +01:00
|
|
|
// ToolChain
|
2016-12-05 16:08:01 +01:00
|
|
|
Core::Id toolchainType;
|
|
|
|
|
bool isMsvc2015Toolchain = false;
|
|
|
|
|
QString toolChainTargetTriple;
|
2019-01-08 15:13:48 +01:00
|
|
|
ToolChainWordWidth toolChainWordWidth = WordWidth32Bit;
|
|
|
|
|
ProjectExplorer::WarningFlags warningFlags = ProjectExplorer::WarningFlags::Default;
|
|
|
|
|
|
|
|
|
|
// Misc
|
2017-12-15 15:28:13 +01:00
|
|
|
QStringList extraCodeModelFlags;
|
2016-01-13 14:12:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace CppTools
|