cmake/Source/cmExtraCodeLiteGenerator.h

69 lines
2.9 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2014-08-03 19:52:23 +02:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include <map>
#include <set>
#include <string>
#include <vector>
2020-02-01 23:06:01 +01:00
#include "cmExternalMakefileProjectGenerator.h"
2014-08-03 19:52:23 +02:00
class cmLocalGenerator;
2016-10-30 18:24:19 +01:00
class cmMakefile;
class cmGeneratorTarget;
class cmXMLWriter;
class cmSourceFile;
2014-08-03 19:52:23 +02:00
class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator
{
protected:
std::string ConfigName;
std::string WorkspacePath;
2019-11-11 23:01:05 +01:00
unsigned int CpuCount = 2;
2014-08-03 19:52:23 +02:00
std::string GetCodeLiteCompilerName(const cmMakefile* mf) const;
2016-07-09 11:21:54 +02:00
std::string GetConfigurationName(const cmMakefile* mf) const;
2017-04-14 19:02:05 +02:00
std::string GetBuildCommand(const cmMakefile* mf,
const std::string& targetName) const;
std::string GetCleanCommand(const cmMakefile* mf,
const std::string& targetName) const;
std::string GetRebuildCommand(const cmMakefile* mf,
const std::string& targetName) const;
2014-08-03 19:52:23 +02:00
std::string GetSingleFileBuildCommand(const cmMakefile* mf) const;
2016-10-30 18:24:19 +01:00
std::vector<std::string> CreateProjectsByTarget(cmXMLWriter* xml);
std::vector<std::string> CreateProjectsByProjectMaps(cmXMLWriter* xml);
std::string CollectSourceFiles(const cmMakefile* makefile,
const cmGeneratorTarget* gt,
std::map<std::string, cmSourceFile*>& cFiles,
std::set<std::string>& otherFiles);
void FindMatchingHeaderfiles(std::map<std::string, cmSourceFile*>& cFiles,
std::set<std::string>& otherFiles);
void CreateProjectSourceEntries(std::map<std::string, cmSourceFile*>& cFiles,
std::set<std::string>& otherFiles,
cmXMLWriter* xml,
const std::string& projectPath,
const cmMakefile* mf,
2017-04-14 19:02:05 +02:00
const std::string& projectType,
const std::string& targetName);
2017-07-20 19:35:53 +02:00
void CreateFoldersAndFiles(std::set<std::string>& cFiles, cmXMLWriter& xml,
const std::string& projectPath);
void CreateFoldersAndFiles(std::map<std::string, cmSourceFile*>& cFiles,
cmXMLWriter& xml, const std::string& projectPath);
2016-07-09 11:21:54 +02:00
2014-08-03 19:52:23 +02:00
public:
cmExtraCodeLiteGenerator();
2016-10-30 18:24:19 +01:00
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
2018-01-26 17:06:56 +01:00
void Generate() override;
2014-08-03 19:52:23 +02:00
void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
2016-07-09 11:21:54 +02:00
const std::string& filename);
2016-10-30 18:24:19 +01:00
void CreateNewProjectFile(const cmGeneratorTarget* lg,
const std::string& filename);
2014-08-03 19:52:23 +02:00
};