2015-02-24 21:57:00 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 Canonical Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2015-02-24 21:57:00 +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.
|
2015-02-24 21:57:00 +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.
|
2015-02-24 21:57:00 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
2016-01-15 14:57:40 +01:00
|
|
|
|
2016-01-27 10:14:00 +01:00
|
|
|
#pragma once
|
2015-02-24 21:57:00 +01:00
|
|
|
|
|
|
|
|
#include "cmake_global.h"
|
|
|
|
|
|
2016-02-12 12:23:18 +01:00
|
|
|
#include "cmakeconfigitem.h"
|
|
|
|
|
|
2015-02-24 21:57:00 +01:00
|
|
|
#include <projectexplorer/kitmanager.h>
|
|
|
|
|
|
|
|
|
|
namespace CMakeProjectManager {
|
|
|
|
|
|
|
|
|
|
class CMakeTool;
|
|
|
|
|
|
|
|
|
|
class CMAKE_EXPORT CMakeKitInformation : public ProjectExplorer::KitInformation
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
CMakeKitInformation();
|
|
|
|
|
|
|
|
|
|
static CMakeTool *cmakeTool(const ProjectExplorer::Kit *k);
|
|
|
|
|
static void setCMakeTool(ProjectExplorer::Kit *k, const Core::Id id);
|
|
|
|
|
|
|
|
|
|
// KitInformation interface
|
2016-02-04 17:49:28 +01:00
|
|
|
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
|
2015-06-03 15:33:18 +02:00
|
|
|
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
void setup(ProjectExplorer::Kit *k) override;
|
|
|
|
|
void fix(ProjectExplorer::Kit *k) override;
|
2016-01-07 15:22:53 +01:00
|
|
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
2015-11-23 12:45:47 +01:00
|
|
|
|
|
|
|
|
void addToMacroExpander(ProjectExplorer::Kit *k, Utils::MacroExpander *expander) const override;
|
2015-02-24 21:57:00 +01:00
|
|
|
};
|
|
|
|
|
|
2016-01-22 17:17:36 +01:00
|
|
|
class CMAKE_EXPORT CMakeGeneratorKitInformation : public ProjectExplorer::KitInformation
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
CMakeGeneratorKitInformation();
|
|
|
|
|
|
|
|
|
|
static QString generator(const ProjectExplorer::Kit *k);
|
|
|
|
|
static void setGenerator(ProjectExplorer::Kit *k, const QString &generator);
|
|
|
|
|
static QString generatorArgument(const ProjectExplorer::Kit *k);
|
|
|
|
|
|
|
|
|
|
// KitInformation interface
|
|
|
|
|
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
void setup(ProjectExplorer::Kit *k) override;
|
|
|
|
|
void fix(ProjectExplorer::Kit *k) override;
|
|
|
|
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
|
|
|
|
};
|
|
|
|
|
|
2016-02-12 12:23:18 +01:00
|
|
|
class CMAKE_EXPORT CMakeConfigurationKitInformation : public ProjectExplorer::KitInformation
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
CMakeConfigurationKitInformation();
|
|
|
|
|
|
|
|
|
|
static CMakeConfig configuration(const ProjectExplorer::Kit *k);
|
|
|
|
|
static void setConfiguration(ProjectExplorer::Kit *k, const CMakeConfig &config);
|
|
|
|
|
|
|
|
|
|
static QStringList toStringList(const ProjectExplorer::Kit *k);
|
|
|
|
|
static void fromStringList(ProjectExplorer::Kit *k, const QStringList &in);
|
|
|
|
|
|
2016-04-06 15:29:39 +02:00
|
|
|
static CMakeConfig defaultConfiguration(const ProjectExplorer::Kit *k);
|
|
|
|
|
|
2016-02-12 12:23:18 +01:00
|
|
|
// KitInformation interface
|
|
|
|
|
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
void setup(ProjectExplorer::Kit *k) override;
|
|
|
|
|
void fix(ProjectExplorer::Kit *k) override;
|
|
|
|
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
|
|
|
|
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
|
|
|
|
};
|
|
|
|
|
|
2015-02-24 21:57:00 +01:00
|
|
|
} // namespace CMakeProjectManager
|