mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
export: Implement EXPORT subcommand (#9822)
Teach the export command to handle export sets defined by invocations of install(TARGETS ... EXPORT foo). This makes maintenance of targets exported to both the build tree and install tree trivial.
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include "cmExportFileGenerator.h"
|
||||
#include "cmListFileCache.h"
|
||||
|
||||
class cmExportSet;
|
||||
|
||||
/** \class cmExportBuildFileGenerator
|
||||
* \brief Generate a file exporting targets from a build tree.
|
||||
*
|
||||
@@ -32,11 +34,11 @@ public:
|
||||
/** Set the list of targets to export. */
|
||||
void SetTargets(std::vector<std::string> const& targets)
|
||||
{ this->Targets = targets; }
|
||||
std::vector<std::string> const& GetTargets() const
|
||||
{ return this->Targets; }
|
||||
void GetTargets(std::vector<std::string> &targets) const;
|
||||
void AppendTargets(std::vector<std::string> const& targets)
|
||||
{ this->Targets.insert(this->Targets.end(),
|
||||
targets.begin(), targets.end()); }
|
||||
void SetExportSet(cmExportSet*);
|
||||
|
||||
/** Set whether to append generated code to the output file. */
|
||||
void SetAppendMode(bool append) { this->AppendMode = append; }
|
||||
@@ -75,6 +77,7 @@ protected:
|
||||
FindNamespaces(cmMakefile* mf, const std::string& name);
|
||||
|
||||
std::vector<std::string> Targets;
|
||||
cmExportSet *ExportSet;
|
||||
std::vector<cmTarget*> Exports;
|
||||
cmMakefile* Makefile;
|
||||
cmListFileBacktrace Backtrace;
|
||||
|
||||
Reference in New Issue
Block a user