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
384a0dba
Commit
384a0dba
authored
Jun 21, 2015
by
Stephen Kelly
Browse files
cmMakefile: Simplify condition handling.
parent
5e24ff17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmMakefile.cxx
View file @
384a0dba
...
...
@@ -564,14 +564,15 @@ bool cmMakefile::ReadListFile(const char* listfile,
this
->
ListFileStack
.
push_back
(
filenametoread
);
cmListFile
listFile
;
bool
res
=
listFile
.
ParseFile
(
filenametoread
.
c_str
(),
requireProjectCommand
,
this
);
if
(
res
)
if
(
!
listFile
.
ParseFile
(
filenametoread
.
c_str
(),
requireProjectCommand
,
this
))
{
// add this list file to the list of dependencies
this
->
ListFiles
.
push_back
(
filenametoread
);
return
false
;
}
// add this list file to the list of dependencies
this
->
ListFiles
.
push_back
(
filenametoread
);
std
::
string
currentParentFile
=
this
->
GetSafeDefinition
(
"CMAKE_PARENT_LIST_FILE"
);
std
::
string
currentFile
...
...
@@ -585,13 +586,8 @@ bool cmMakefile::ReadListFile(const char* listfile,
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_DIR"
);
if
(
res
)
{
this
->
ReadListFileInternal
(
listFile
,
filenametoread
.
c_str
(),
noPolicyScope
);
this
->
CheckForUnusedVariables
();
}
this
->
ReadListFileInternal
(
listFile
,
filenametoread
.
c_str
(),
noPolicyScope
);
this
->
CheckForUnusedVariables
();
this
->
AddDefinition
(
"CMAKE_PARENT_LIST_FILE"
,
currentParentFile
.
c_str
());
this
->
AddDefinition
(
"CMAKE_CURRENT_LIST_FILE"
,
currentFile
.
c_str
());
...
...
@@ -601,7 +597,7 @@ bool cmMakefile::ReadListFile(const char* listfile,
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_FILE"
);
this
->
MarkVariableAsUsed
(
"CMAKE_CURRENT_LIST_DIR"
);
return
res
;
return
true
;
}
void
cmMakefile
::
ReadListFileInternal
(
cmListFile
const
&
listFile
,
...
...
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