2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2015-07-27 20:56:13 +00:00
|
|
|
#ifndef cmExportTryCompileFileGenerator_h
|
|
|
|
#define cmExportTryCompileFileGenerator_h
|
2013-02-07 16:36:29 +00:00
|
|
|
|
2016-09-01 18:59:28 +00:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2013-02-07 16:36:29 +00:00
|
|
|
#include "cmExportFileGenerator.h"
|
|
|
|
|
2016-09-01 18:59:28 +00:00
|
|
|
#include <iosfwd>
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class cmGeneratorTarget;
|
|
|
|
class cmGlobalGenerator;
|
|
|
|
class cmMakefile;
|
2013-02-07 16:36:29 +00:00
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
class cmExportTryCompileFileGenerator : public cmExportFileGenerator
|
2013-02-07 16:36:29 +00:00
|
|
|
{
|
|
|
|
public:
|
2015-10-17 12:27:59 +00:00
|
|
|
cmExportTryCompileFileGenerator(cmGlobalGenerator* gg,
|
|
|
|
std::vector<std::string> const& targets,
|
|
|
|
cmMakefile* mf);
|
2015-07-25 18:44:35 +00:00
|
|
|
|
2013-02-07 16:36:29 +00:00
|
|
|
/** Set the list of targets to export. */
|
2014-02-10 03:48:34 +00:00
|
|
|
void SetConfig(const std::string& config) { this->Config = config; }
|
2013-02-07 16:36:29 +00:00
|
|
|
protected:
|
|
|
|
// Implement virtual methods from the superclass.
|
2016-06-27 19:25:27 +00:00
|
|
|
bool GenerateMainFile(std::ostream& os) CM_OVERRIDE;
|
2013-02-07 16:36:29 +00:00
|
|
|
|
2016-06-27 19:25:27 +00:00
|
|
|
void GenerateImportTargetsConfig(std::ostream&, const std::string&,
|
|
|
|
std::string const&,
|
|
|
|
std::vector<std::string>&) CM_OVERRIDE
|
2016-05-16 14:34:04 +00:00
|
|
|
{
|
|
|
|
}
|
2016-06-27 19:25:27 +00:00
|
|
|
void HandleMissingTarget(std::string&, std::vector<std::string>&,
|
|
|
|
cmGeneratorTarget*, cmGeneratorTarget*) CM_OVERRIDE
|
2016-05-16 14:34:04 +00:00
|
|
|
{
|
|
|
|
}
|
2013-02-07 16:36:29 +00:00
|
|
|
|
2015-10-17 12:33:51 +00:00
|
|
|
void PopulateProperties(cmGeneratorTarget const* target,
|
2013-02-07 16:36:29 +00:00
|
|
|
ImportPropertyMap& properties,
|
2015-10-17 12:33:51 +00:00
|
|
|
std::set<const cmGeneratorTarget*>& emitted);
|
2013-02-07 16:36:29 +00:00
|
|
|
|
2015-08-04 17:19:47 +00:00
|
|
|
std::string InstallNameDir(cmGeneratorTarget* target,
|
2016-06-27 19:25:27 +00:00
|
|
|
const std::string& config) CM_OVERRIDE;
|
2016-05-16 14:34:04 +00:00
|
|
|
|
2013-02-07 16:36:29 +00:00
|
|
|
private:
|
2015-10-17 12:33:51 +00:00
|
|
|
std::string FindTargets(const std::string& prop,
|
|
|
|
const cmGeneratorTarget* tgt,
|
|
|
|
std::set<const cmGeneratorTarget*>& emitted);
|
2013-02-07 16:36:29 +00:00
|
|
|
|
2015-10-17 12:27:59 +00:00
|
|
|
std::vector<cmGeneratorTarget const*> Exports;
|
2014-02-10 03:48:34 +00:00
|
|
|
std::string Config;
|
2013-02-07 16:36:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|