cmake/Source/cmExportTryCompileFileGenerator.h

62 lines
2.0 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. */
2015-11-17 17:22:37 +01:00
#ifndef cmExportTryCompileFileGenerator_h
#define cmExportTryCompileFileGenerator_h
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
2013-03-16 19:13:01 +02:00
#include "cmExportFileGenerator.h"
2016-10-30 18:24:19 +01:00
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmMakefile;
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; }
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&,
std::string const&,
2018-01-26 17:06:56 +01:00
std::vector<std::string>&) override
2016-07-09 11:21:54 +02:00
{
}
2016-10-30 18:24:19 +01:00
void HandleMissingTarget(std::string&, std::vector<std::string>&,
2018-01-26 17:06:56 +01:00
cmGeneratorTarget*, 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
2015-11-17 17:22:37 +01:00
std::string InstallNameDir(cmGeneratorTarget* target,
2018-01-26 17:06:56 +01:00
const std::string& config) override;
2016-07-09 11:21:54 +02:00
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
};
#endif