summaryrefslogtreecommitdiff
path: root/Source/cmExportBuildFileGenerator.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-06 17:16:11 +0200
committerStephen Kelly <steveire@gmail.com>2013-10-10 16:36:26 +0200
commit5fe5c32480a5acf26bd20e52a091cd63747ed77d (patch)
tree748ebca1ae42657e8ccea1910a8457200fb9969b /Source/cmExportBuildFileGenerator.h
parente383555838c2539eca11c43abfccba9fa41ca97d (diff)
downloadcmake-5fe5c32480a5acf26bd20e52a091cd63747ed77d.tar.gz
export(): Set a Makefile on the cmExportBuildFileGenerator.
This is better than the cmCommand, because the lifetime of that is not as useful, and it is only used to report an error anyway. In the next commit, the cmExportBuildFileGenerator will outlive the cmCommand.
Diffstat (limited to 'Source/cmExportBuildFileGenerator.h')
-rw-r--r--Source/cmExportBuildFileGenerator.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h
index 3ffdf8b133..4436896107 100644
--- a/Source/cmExportBuildFileGenerator.h
+++ b/Source/cmExportBuildFileGenerator.h
@@ -13,8 +13,7 @@
#define cmExportBuildFileGenerator_h
#include "cmExportFileGenerator.h"
-
-class cmExportCommand;
+#include "cmListFileCache.h"
/** \class cmExportBuildFileGenerator
* \brief Generate a file exporting targets from a build tree.
@@ -37,8 +36,11 @@ public:
/** Set whether to append generated code to the output file. */
void SetAppendMode(bool append) { this->AppendMode = append; }
- /** Set the command instance through which errors should be reported. */
- void SetCommand(cmExportCommand* cmd) { this->ExportCommand = cmd; }
+ void SetMakefile(cmMakefile *mf) {
+ this->Makefile = mf;
+ this->Makefile->GetBacktrace(this->Backtrace);
+ }
+
protected:
// Implement virtual methods from the superclass.
virtual bool GenerateMainFile(std::ostream& os);
@@ -64,7 +66,8 @@ protected:
std::string InstallNameDir(cmTarget* target, const std::string& config);
std::vector<cmTarget*> const* Exports;
- cmExportCommand* ExportCommand;
+ cmMakefile* Makefile;
+ cmListFileBacktrace Backtrace;
};
#endif