2013-02-07 20:36:29 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2013 Stephen Kelly <steveire@gmail.com>
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2015-07-27 23:56:13 +03:00
|
|
|
#ifndef cmExportTryCompileFileGenerator_h
|
|
|
|
#define cmExportTryCompileFileGenerator_h
|
2013-02-07 20:36:29 +04:00
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2013-02-07 20:36:29 +04:00
|
|
|
#include "cmExportFileGenerator.h"
|
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <iosfwd>
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class cmGeneratorTarget;
|
|
|
|
class cmGlobalGenerator;
|
|
|
|
class cmMakefile;
|
2013-02-07 20:36:29 +04:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
class cmExportTryCompileFileGenerator : public cmExportFileGenerator
|
2013-02-07 20:36:29 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-10-17 15:27:59 +03:00
|
|
|
cmExportTryCompileFileGenerator(cmGlobalGenerator* gg,
|
|
|
|
std::vector<std::string> const& targets,
|
|
|
|
cmMakefile* mf);
|
2015-07-25 21:44:35 +03:00
|
|
|
|
2013-02-07 20:36:29 +04:00
|
|
|
/** Set the list of targets to export. */
|
2014-02-10 07:48:34 +04:00
|
|
|
void SetConfig(const std::string& config) { this->Config = config; }
|
2013-02-07 20:36:29 +04:00
|
|
|
protected:
|
|
|
|
// Implement virtual methods from the superclass.
|
2016-06-27 22:25:27 +03:00
|
|
|
bool GenerateMainFile(std::ostream& os) CM_OVERRIDE;
|
2013-02-07 20:36:29 +04:00
|
|
|
|
2016-06-27 22:25:27 +03:00
|
|
|
void GenerateImportTargetsConfig(std::ostream&, const std::string&,
|
|
|
|
std::string const&,
|
|
|
|
std::vector<std::string>&) CM_OVERRIDE
|
2016-05-16 17:34:04 +03:00
|
|
|
{
|
|
|
|
}
|
2016-06-27 22:25:27 +03:00
|
|
|
void HandleMissingTarget(std::string&, std::vector<std::string>&,
|
|
|
|
cmGeneratorTarget*, cmGeneratorTarget*) CM_OVERRIDE
|
2016-05-16 17:34:04 +03:00
|
|
|
{
|
|
|
|
}
|
2013-02-07 20:36:29 +04:00
|
|
|
|
2015-10-17 15:33:51 +03:00
|
|
|
void PopulateProperties(cmGeneratorTarget const* target,
|
2013-02-07 20:36:29 +04:00
|
|
|
ImportPropertyMap& properties,
|
2015-10-17 15:33:51 +03:00
|
|
|
std::set<const cmGeneratorTarget*>& emitted);
|
2013-02-07 20:36:29 +04:00
|
|
|
|
2015-08-04 20:19:47 +03:00
|
|
|
std::string InstallNameDir(cmGeneratorTarget* target,
|
2016-06-27 22:25:27 +03:00
|
|
|
const std::string& config) CM_OVERRIDE;
|
2016-05-16 17:34:04 +03:00
|
|
|
|
2013-02-07 20:36:29 +04:00
|
|
|
private:
|
2015-10-17 15:33:51 +03:00
|
|
|
std::string FindTargets(const std::string& prop,
|
|
|
|
const cmGeneratorTarget* tgt,
|
|
|
|
std::set<const cmGeneratorTarget*>& emitted);
|
2013-02-07 20:36:29 +04:00
|
|
|
|
2015-10-17 15:27:59 +03:00
|
|
|
std::vector<cmGeneratorTarget const*> Exports;
|
2014-02-10 07:48:34 +04:00
|
|
|
std::string Config;
|
2013-02-07 20:36:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|