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
8fc53c3c
Commit
8fc53c3c
authored
Jun 08, 2015
by
Stephen Kelly
Browse files
cmGetDirectoryPropertyCommand: Extract StoreResult method.
parent
d17aa606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/cmGetDirectoryPropertyCommand.cxx
View file @
8fc53c3c
...
...
@@ -89,12 +89,18 @@ bool cmGetDirectoryPropertyCommand
{
prop
=
dir
->
GetProperty
(
*
i
);
}
this
->
StoreResult
(
variable
,
prop
);
return
true
;
}
void
cmGetDirectoryPropertyCommand
::
StoreResult
(
std
::
string
const
&
variable
,
const
char
*
prop
)
{
if
(
prop
)
{
this
->
Makefile
->
AddDefinition
(
variable
,
prop
);
return
true
;
return
;
}
this
->
Makefile
->
AddDefinition
(
variable
,
""
);
return
true
;
}
Source/cmGetDirectoryPropertyCommand.h
View file @
8fc53c3c
...
...
@@ -40,8 +40,9 @@ public:
virtual
std
::
string
GetName
()
const
{
return
"get_directory_property"
;}
cmTypeMacro
(
cmGetDirectoryPropertyCommand
,
cmCommand
);
};
private:
void
StoreResult
(
const
std
::
string
&
variable
,
const
char
*
prop
);
};
#endif
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