cmake/Source/cmExportTryCompileFileGenerator.h

71 lines
2.3 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
2013-03-16 19:13:01 +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 <iosfwd>
#include <set>
#include <string>
#include <vector>
2020-02-01 23:06:01 +01:00
#include "cmExportFileGenerator.h"
2022-03-29 21:10:50 +02:00
class cmFileSet;
2016-10-30 18:24:19 +01:00
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmMakefile;
2022-03-29 21:10:50 +02:00
class cmTargetExport;
2013-03-16 19:13:01 +02:00
2016-07-09 11:21:54 +02:00
class cmExportTryCompileFileGenerator : public cmExportFileGenerator
2013-03-16 19:13:01 +02:00
{
public:
2016-03-13 13:35:51 +01:00
cmExportTryCompileFileGenerator(cmGlobalGenerator* gg,
std::vector<std::string> const& targets,
2018-04-23 21:13:27 +02:00
cmMakefile* mf,
std::set<std::string> const& langs);
2015-11-17 17:22:37 +01:00
2013-03-16 19:13:01 +02:00
/** Set the list of targets to export. */
2015-04-27 22:25:09 +02:00
void SetConfig(const std::string& config) { this->Config = config; }
2018-08-09 18:06:22 +02:00
2013-03-16 19:13:01 +02:00
protected:
// Implement virtual methods from the superclass.
2018-01-26 17:06:56 +01:00
bool GenerateMainFile(std::ostream& os) override;
2013-03-16 19:13:01 +02:00
2016-10-30 18:24:19 +01:00
void GenerateImportTargetsConfig(std::ostream&, const std::string&,
2022-08-04 22:12:04 +02:00
std::string const&) override
2016-07-09 11:21:54 +02:00
{
}
2022-08-04 22:12:04 +02:00
void HandleMissingTarget(std::string&, cmGeneratorTarget const*,
2021-11-20 13:41:27 +01:00
cmGeneratorTarget*) override
2016-07-09 11:21:54 +02:00
{
}
2013-03-16 19:13:01 +02:00
2016-03-13 13:35:51 +01:00
void PopulateProperties(cmGeneratorTarget const* target,
2013-03-16 19:13:01 +02:00
ImportPropertyMap& properties,
2016-03-13 13:35:51 +01:00
std::set<const cmGeneratorTarget*>& emitted);
2013-03-16 19:13:01 +02:00
2021-11-20 13:41:27 +01:00
std::string InstallNameDir(cmGeneratorTarget const* target,
2018-01-26 17:06:56 +01:00
const std::string& config) override;
2016-07-09 11:21:54 +02:00
2022-03-29 21:10:50 +02:00
std::string GetFileSetDirectories(cmGeneratorTarget* target,
cmFileSet* fileSet,
cmTargetExport* te) override;
std::string GetFileSetFiles(cmGeneratorTarget* target, cmFileSet* fileSet,
cmTargetExport* te) override;
2022-11-16 20:14:03 +01:00
std::string GetCxxModulesDirectory() const override { return {}; }
void GenerateCxxModuleConfigInformation(std::ostream&) const override {}
2013-03-16 19:13:01 +02:00
private:
2016-03-13 13:35:51 +01:00
std::string FindTargets(const std::string& prop,
const cmGeneratorTarget* tgt,
2018-04-23 21:13:27 +02:00
std::string const& language,
2016-03-13 13:35:51 +01:00
std::set<const cmGeneratorTarget*>& emitted);
2013-03-16 19:13:01 +02:00
2016-03-13 13:35:51 +01:00
std::vector<cmGeneratorTarget const*> Exports;
2015-04-27 22:25:09 +02:00
std::string Config;
2018-04-23 21:13:27 +02:00
std::vector<std::string> Languages;
2013-03-16 19:13:01 +02:00
};