Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
b68f2ea8
Commit
b68f2ea8
authored
May 29, 2015
by
Stephen Kelly
Browse files
cmMakefile: Add API for elseif to create backtrace.
parent
17e13f0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/cmIfCommand.cxx
View file @
b68f2ea8
...
...
@@ -92,10 +92,6 @@ IsFunctionBlocked(const cmListFileFunction& lff,
}
else
{
// Place this call on the call stack.
cmMakefileCall
stack_manager
(
&
mf
,
this
->
Functions
[
c
],
status
);
static_cast
<
void
>
(
stack_manager
);
// if trace is enabled, print the evaluated "elseif" statement
if
(
mf
.
GetCMakeInstance
()
->
GetTrace
())
{
...
...
@@ -119,7 +115,8 @@ IsFunctionBlocked(const cmListFileFunction& lff,
{
std
::
string
err
=
cmIfCommandError
(
expandedArguments
);
err
+=
errorString
;
mf
.
IssueMessage
(
messType
,
err
);
cmListFileBacktrace
bt
=
mf
.
GetBacktrace
(
this
->
Functions
[
c
]);
mf
.
GetCMakeInstance
()
->
IssueMessage
(
messType
,
err
,
bt
);
if
(
messType
==
cmake
::
FATAL_ERROR
)
{
cmSystemTools
::
SetFatalErrorOccured
();
...
...
Source/cmMakefile.cxx
View file @
b68f2ea8
...
...
@@ -286,6 +286,20 @@ cmListFileBacktrace cmMakefile::GetBacktrace() const
return
backtrace
;
}
//----------------------------------------------------------------------------
cmListFileBacktrace
cmMakefile
::
GetBacktrace
(
cmListFileContext
const
&
lfc
)
const
{
cmListFileBacktrace
backtrace
(
this
->
GetLocalGenerator
());
backtrace
.
Append
(
lfc
);
for
(
CallStackType
::
const_reverse_iterator
i
=
this
->
CallStack
.
rbegin
();
i
!=
this
->
CallStack
.
rend
();
++
i
)
{
backtrace
.
Append
(
*
i
->
Context
);
}
return
backtrace
;
}
//----------------------------------------------------------------------------
cmListFileContext
cmMakefile
::
GetExecutionContext
()
const
{
...
...
Source/cmMakefile.h
View file @
b68f2ea8
...
...
@@ -572,6 +572,7 @@ public:
* Get the current context backtrace.
*/
cmListFileBacktrace
GetBacktrace
()
const
;
cmListFileBacktrace
GetBacktrace
(
cmListFileContext
const
&
lfc
)
const
;
cmListFileContext
GetExecutionContext
()
const
;
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment