2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2019-06-13 14:24:04 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "cmakebuildtarget.h"
|
|
|
|
|
#include "cmakeprojectnodes.h"
|
|
|
|
|
|
2019-08-28 18:22:45 +02:00
|
|
|
#include <projectexplorer/rawprojectpart.h>
|
2019-06-13 14:24:04 +02:00
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
#include <utils/filepath.h>
|
2020-04-17 15:30:05 +02:00
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
|
#include <QSet>
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
2019-06-13 14:24:04 +02:00
|
|
|
#include <memory>
|
2022-08-26 10:30:00 +02:00
|
|
|
#include <optional>
|
2019-06-13 14:24:04 +02:00
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
namespace CMakeProjectManager::Internal {
|
2019-06-13 14:24:04 +02:00
|
|
|
|
2020-04-17 15:30:05 +02:00
|
|
|
class FileApiData;
|
|
|
|
|
|
2021-09-01 19:49:08 +02:00
|
|
|
class CMakeFileInfo
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool operator==(const CMakeFileInfo& other) const { return path == other.path; }
|
2021-12-06 05:11:04 +01:00
|
|
|
friend auto qHash(const CMakeFileInfo &info, uint seed = 0) { return info.path.hash(seed); }
|
2021-09-01 19:49:08 +02:00
|
|
|
|
|
|
|
|
Utils::FilePath path;
|
|
|
|
|
bool isCMake = false;
|
|
|
|
|
bool isCMakeListsDotTxt = false;
|
|
|
|
|
bool isExternal = false;
|
|
|
|
|
bool isGenerated = false;
|
|
|
|
|
};
|
|
|
|
|
|
2019-06-13 14:24:04 +02:00
|
|
|
class FileApiQtcData
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString errorMessage;
|
|
|
|
|
CMakeConfig cache;
|
2021-09-01 19:49:08 +02:00
|
|
|
QSet<CMakeFileInfo> cmakeFiles;
|
2019-06-13 14:24:04 +02:00
|
|
|
QList<CMakeBuildTarget> buildTargets;
|
2019-08-28 18:22:45 +02:00
|
|
|
ProjectExplorer::RawProjectParts projectParts;
|
2019-06-13 14:24:04 +02:00
|
|
|
std::unique_ptr<CMakeProjectNode> rootProjectNode;
|
2020-09-28 15:10:04 +02:00
|
|
|
QString ctestPath;
|
2021-01-14 16:38:55 +01:00
|
|
|
bool isMultiConfig = false;
|
|
|
|
|
bool usesAllCapsTargets = false;
|
2019-06-13 14:24:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
FileApiQtcData extractData(FileApiData &data,
|
|
|
|
|
const Utils::FilePath &sourceDirectory,
|
|
|
|
|
const Utils::FilePath &buildDirectory);
|
|
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
} // CMakeProjectManager::Internal
|