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
816b4a8a
Commit
816b4a8a
authored
Oct 22, 2013
by
Stephen Kelly
Browse files
cmTarget: Make consistentProperty return consistent content.
Upcoming features will make use of that.
parent
030800a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmTarget.cxx
View file @
816b4a8a
...
@@ -4452,7 +4452,7 @@ const char *getTypedProperty<const char *>(cmTarget *tgt, const char *prop,
...
@@ -4452,7 +4452,7 @@ const char *getTypedProperty<const char *>(cmTarget *tgt, const char *prop,
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template
<
typename
PropertyType
>
template
<
typename
PropertyType
>
bool
consistentProperty
(
PropertyType
lhs
,
PropertyType
rhs
);
PropertyType
consistentProperty
(
PropertyType
lhs
,
PropertyType
rhs
);
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template
<
>
template
<
>
...
@@ -4463,13 +4463,21 @@ bool consistentProperty(bool lhs, bool rhs)
...
@@ -4463,13 +4463,21 @@ bool consistentProperty(bool lhs, bool rhs)
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template
<
>
template
<
>
bool
consistentProperty
(
const
char
*
lhs
,
const
char
*
rhs
)
const
char
*
consistentProperty
(
const
char
*
lhs
,
const
char
*
rhs
)
{
{
if
(
!
lhs
&&
!
rhs
)
if
(
!
lhs
&&
!
rhs
)
return
true
;
{
if
(
!
lhs
||
!
rhs
)
return
""
;
return
false
;
}
return
strcmp
(
lhs
,
rhs
)
==
0
;
if
(
!
lhs
)
{
return
rhs
?
rhs
:
""
;
}
if
(
!
rhs
)
{
return
lhs
?
lhs
:
""
;
}
return
strcmp
(
lhs
,
rhs
)
==
0
?
lhs
:
0
;
}
}
template
<
typename
PropertyType
>
template
<
typename
PropertyType
>
...
...
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