Commit f4d94661 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

Genex: Accept arbitrary content in *_CASE and MAKE_C_IDENTIFIER.

parent d36b4894
...@@ -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 *,
......
...@@ -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
......
...@@ -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__")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment