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
Brad King
CMake
Commits
f4d94661
Commit
f4d94661
authored
Dec 15, 2013
by
Stephen Kelly
Browse files
Genex: Accept arbitrary content in *_CASE and MAKE_C_IDENTIFIER.
parent
d36b4894
Changes
3
Show whitespace changes
Inline
Side-by-side
Source/cmGeneratorExpressionEvaluator.cxx
View file @
f4d94661
...
@@ -201,6 +201,8 @@ static const struct LowerCaseNode : public cmGeneratorExpressionNode
...
@@ -201,6 +201,8 @@ static const struct LowerCaseNode : public cmGeneratorExpressionNode
{
{
LowerCaseNode
()
{}
LowerCaseNode
()
{}
bool
AcceptsArbitraryContentParameter
()
const
{
return
true
;
}
std
::
string
Evaluate
(
const
std
::
vector
<
std
::
string
>
&
parameters
,
std
::
string
Evaluate
(
const
std
::
vector
<
std
::
string
>
&
parameters
,
cmGeneratorExpressionContext
*
,
cmGeneratorExpressionContext
*
,
const
GeneratorExpressionContent
*
,
const
GeneratorExpressionContent
*
,
...
@@ -215,6 +217,8 @@ static const struct UpperCaseNode : public cmGeneratorExpressionNode
...
@@ -215,6 +217,8 @@ static const struct UpperCaseNode : public cmGeneratorExpressionNode
{
{
UpperCaseNode
()
{}
UpperCaseNode
()
{}
bool
AcceptsArbitraryContentParameter
()
const
{
return
true
;
}
std
::
string
Evaluate
(
const
std
::
vector
<
std
::
string
>
&
parameters
,
std
::
string
Evaluate
(
const
std
::
vector
<
std
::
string
>
&
parameters
,
cmGeneratorExpressionContext
*
,
cmGeneratorExpressionContext
*
,
const
GeneratorExpressionContent
*
,
const
GeneratorExpressionContent
*
,
...
@@ -229,6 +233,8 @@ static const struct MakeCIdentifierNode : public cmGeneratorExpressionNode
...
@@ -229,6 +233,8 @@ static const struct MakeCIdentifierNode : public cmGeneratorExpressionNode
{
{
MakeCIdentifierNode
()
{}
MakeCIdentifierNode
()
{}
bool
AcceptsArbitraryContentParameter
()
const
{
return
true
;
}
std
::
string
Evaluate
(
const
std
::
vector
<
std
::
string
>
&
parameters
,
std
::
string
Evaluate
(
const
std
::
vector
<
std
::
string
>
&
parameters
,
cmGeneratorExpressionContext
*
,
cmGeneratorExpressionContext
*
,
const
GeneratorExpressionContent
*
,
const
GeneratorExpressionContent
*
,
...
...
Tests/GeneratorExpression/CMakeLists.txt
View file @
f4d94661
...
@@ -193,9 +193,9 @@ add_custom_target(check-part3 ALL
...
@@ -193,9 +193,9 @@ add_custom_target(check-part3 ALL
-Dtest_platform_id_Linux=$<PLATFORM_ID:Linux>
-Dtest_platform_id_Linux=$<PLATFORM_ID:Linux>
-Dtest_platform_id_Windows=$<PLATFORM_ID:Windows>
-Dtest_platform_id_Windows=$<PLATFORM_ID:Windows>
-Dtest_platform_id_Darwin=$<PLATFORM_ID:Darwin>
-Dtest_platform_id_Darwin=$<PLATFORM_ID:Darwin>
-Dlower_case=$<LOWER_CASE:MiXeD>
-Dlower_case=$<LOWER_CASE:Mi
,
XeD>
-Dupper_case=$<UPPER_CASE:MiXeD>
-Dupper_case=$<UPPER_CASE:MiX
,
eD>
-Dmake_c_identifier=$<MAKE_C_IDENTIFIER:4foo:+bar-$>
-Dmake_c_identifier=$<MAKE_C_IDENTIFIER:4f
,
oo:+bar-$>
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/check-part3.cmake
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/check-part3.cmake
COMMAND
${
CMAKE_COMMAND
}
-E echo
"check done (part 3 of 3)"
COMMAND
${
CMAKE_COMMAND
}
-E echo
"check done (part 3 of 3)"
VERBATIM
VERBATIM
...
...
Tests/GeneratorExpression/check-part3.cmake
View file @
f4d94661
...
@@ -34,6 +34,6 @@ foreach(system Linux Windows Darwin)
...
@@ -34,6 +34,6 @@ foreach(system Linux Windows Darwin)
check
(
test_platform_id_
${
system
}
0
)
check
(
test_platform_id_
${
system
}
0
)
endif
()
endif
()
endforeach
()
endforeach
()
check
(
lower_case
"mixed"
)
check
(
lower_case
"mi
,
xed"
)
check
(
upper_case
"MIXED"
)
check
(
upper_case
"MIX
,
ED"
)
check
(
make_c_identifier
"_4foo__bar__"
)
check
(
make_c_identifier
"_4f
_
oo__bar__"
)
Write
Preview
Markdown
is supported
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