summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-06 19:33:59 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-15 19:53:24 (GMT)
commitbfb7288f8103298bf4cabb60a13208f95595a7db (patch)
tree907bea44648b982fd16425dbbc90d48915e8fe7c /Source/cmCustomCommand.h
parent53ea8b32045ce4c8045b904407e7e57d8d9fd4ab (diff)
downloadCMake-bfb7288f8103298bf4cabb60a13208f95595a7db.zip
CMake-bfb7288f8103298bf4cabb60a13208f95595a7db.tar.gz
CMake-bfb7288f8103298bf4cabb60a13208f95595a7db.tar.bz2
Record backtrace in cmCustomCommand
This will be used to report custom command errors to the user with a backtrace pointing at the add_custom_command or add_custom_target call.
Diffstat (limited to 'Source/cmCustomCommand.h')
-rw-r--r--Source/cmCustomCommand.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index c9adddf..dd92e34 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -13,6 +13,8 @@
#define cmCustomCommand_h
#include "cmStandardIncludes.h"
+class cmMakefile;
+class cmListFileBacktrace;
/** \class cmCustomCommand
* \brief A class to encapsulate a custom command
@@ -27,12 +29,15 @@ public:
cmCustomCommand(const cmCustomCommand& r);
/** Main constructor specifies all information for the command. */
- cmCustomCommand(const std::vector<std::string>& outputs,
+ cmCustomCommand(cmMakefile* mf,
+ const std::vector<std::string>& outputs,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines,
const char* comment,
const char* workingDirectory);
+ ~cmCustomCommand();
+
/** Get the output file produced by the command. */
const std::vector<std::string>& GetOutputs() const;
@@ -63,6 +68,9 @@ public:
bool GetEscapeAllowMakeVars() const;
void SetEscapeAllowMakeVars(bool b);
+ /** Backtrace of the command that created this custom command. */
+ cmListFileBacktrace const& GetBacktrace() const;
+
typedef std::pair<cmStdString, cmStdString> ImplicitDependsPair;
class ImplicitDependsList: public std::vector<ImplicitDependsPair> {};
void SetImplicitDepends(ImplicitDependsList const&);
@@ -78,6 +86,7 @@ private:
std::string WorkingDirectory;
bool EscapeAllowMakeVars;
bool EscapeOldStyle;
+ cmListFileBacktrace* Backtrace;
ImplicitDependsList ImplicitDepends;
};