summaryrefslogtreecommitdiffstats
path: root/Source/cmExportBuildFileGenerator.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-06 15:16:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-10 14:36:26 (GMT)
commit5fe5c32480a5acf26bd20e52a091cd63747ed77d (patch)
tree748ebca1ae42657e8ccea1910a8457200fb9969b /Source/cmExportBuildFileGenerator.h
parente383555838c2539eca11c43abfccba9fa41ca97d (diff)
downloadCMake-5fe5c32480a5acf26bd20e52a091cd63747ed77d.zip
CMake-5fe5c32480a5acf26bd20e52a091cd63747ed77d.tar.gz
CMake-5fe5c32480a5acf26bd20e52a091cd63747ed77d.tar.bz2
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 3ffdf8b..4436896 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