cmake/Source/cmExportTryCompileFileGenerator.h

60 lines
2.2 KiB
C
Raw Normal View History

2013-03-16 19:13:01 +02: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-11-17 17:22:37 +01:00
#ifndef cmExportTryCompileFileGenerator_h
#define cmExportTryCompileFileGenerator_h
2013-03-16 19:13:01 +02:00
#include "cmExportFileGenerator.h"
class cmInstallExportGenerator;
class cmInstallTargetGenerator;
class cmExportTryCompileFileGenerator: public cmExportFileGenerator
{
public:
2016-03-13 13:35:51 +01:00
cmExportTryCompileFileGenerator(cmGlobalGenerator* gg,
std::vector<std::string> const& targets,
cmMakefile* mf);
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.
virtual bool GenerateMainFile(std::ostream& os);
virtual void GenerateImportTargetsConfig(std::ostream&,
2015-04-27 22:25:09 +02:00
const std::string&,
2013-03-16 19:13:01 +02:00
std::string const&,
std::vector<std::string>&) {}
virtual void HandleMissingTarget(std::string&,
std::vector<std::string>&,
2016-03-13 13:35:51 +01:00
cmGeneratorTarget*,
cmGeneratorTarget*) {}
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,
2013-11-03 12:27:13 +02:00
const std::string& config);
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,
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;
2013-03-16 19:13:01 +02:00
};
#endif