Skip to content
GitLab
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
ad47e6e5
Commit
ad47e6e5
authored
Jun 21, 2015
by
Stephen Kelly
Browse files
cmMakefile: Inline ReadListFileInternal into caller.
parent
254be613
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/cmMakefile.cxx
View file @
ad47e6e5
...
...
@@ -595,22 +595,6 @@ bool cmMakefile::ReadListFile(const char* listfile,
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_DIR"
);
this
->
ReadListFileInternal
(
listFile
);
this
->
CheckForUnusedVariables
();
this
->
AddDefinition
(
"CMAKE_PARENT_LIST_FILE"
,
currentParentFile
.
c_str
());
this
->
AddDefinition
(
"CMAKE_CURRENT_LIST_FILE"
,
currentFile
.
c_str
());
this
->
AddDefinition
(
"CMAKE_CURRENT_LIST_DIR"
,
cmSystemTools
::
GetFilenamePath
(
currentFile
).
c_str
());
this
->
MarkVariableAsUsed
(
"CMAKE_PARENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_DIR"
);
return
true
;
}
void
cmMakefile
::
ReadListFileInternal
(
cmListFile
const
&
listFile
)
{
// Enforce balanced blocks (if/endif, function/endfunction, etc.).
LexicalPushPop
lexScope
(
this
);
...
...
@@ -632,6 +616,17 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
break
;
}
}
this
->
CheckForUnusedVariables
();
this
->
AddDefinition
(
"CMAKE_PARENT_LIST_FILE"
,
currentParentFile
.
c_str
());
this
->
AddDefinition
(
"CMAKE_CURRENT_LIST_FILE"
,
currentFile
.
c_str
());
this
->
AddDefinition
(
"CMAKE_CURRENT_LIST_DIR"
,
cmSystemTools
::
GetFilenamePath
(
currentFile
).
c_str
());
this
->
MarkVariableAsUsed
(
"CMAKE_PARENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_DIR"
);
return
true
;
}
//----------------------------------------------------------------------------
...
...
Source/cmMakefile.h
View file @
ad47e6e5
...
...
@@ -917,8 +917,6 @@ private:
bool
ReadListFile
(
const
char
*
listfile
,
bool
requireProjectCommand
);
void
ReadListFileInternal
(
cmListFile
const
&
listFile
);
bool
ParseDefineFlag
(
std
::
string
const
&
definition
,
bool
remove
);
bool
EnforceUniqueDir
(
const
std
::
string
&
srcPath
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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