summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-01-04 18:38:23 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-06 17:46:45 (GMT)
commit9c9f69fb9c0c1ab1f62de646cffe48485bd893af (patch)
tree483e4b7e1021b4217d415fca3a615bfc95293fb5 /Source
parent6eb32181052e2262fd2b8ed1d6fa19e279d7ae5e (diff)
downloadCMake-9c9f69fb9c0c1ab1f62de646cffe48485bd893af.zip
CMake-9c9f69fb9c0c1ab1f62de646cffe48485bd893af.tar.gz
CMake-9c9f69fb9c0c1ab1f62de646cffe48485bd893af.tar.bz2
Genex: Make EQUAL support upper case binary literals
As C++11, python, D and java do. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf Add test for uppercase hex literals.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index fec43b9..259ba94 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -215,18 +215,18 @@ static const struct EqualNode : public cmGeneratorExpressionNode
bool flipSign = false;
const char *lhs = parameters[0].c_str();
- if (cmHasLiteralPrefix(lhs, "0b"))
+ if (cmHasLiteralPrefix(lhs, "0b") || cmHasLiteralPrefix(lhs, "0B"))
{
base = 2;
lhs += 2;
}
- if (cmHasLiteralPrefix(lhs, "-0b"))
+ if (cmHasLiteralPrefix(lhs, "-0b") || cmHasLiteralPrefix(lhs, "-0B"))
{
base = 2;
lhs += 3;
flipSign = true;
}
- if (cmHasLiteralPrefix(lhs, "+0b"))
+ if (cmHasLiteralPrefix(lhs, "+0b") || cmHasLiteralPrefix(lhs, "+0B"))
{
base = 2;
lhs += 3;
@@ -249,18 +249,18 @@ static const struct EqualNode : public cmGeneratorExpressionNode
flipSign = false;
const char *rhs = parameters[1].c_str();
- if (cmHasLiteralPrefix(rhs, "0b"))
+ if (cmHasLiteralPrefix(rhs, "0b") || cmHasLiteralPrefix(rhs, "0B"))
{
base = 2;
rhs += 2;
}
- if (cmHasLiteralPrefix(rhs, "-0b"))
+ if (cmHasLiteralPrefix(rhs, "-0b") || cmHasLiteralPrefix(rhs, "-0B"))
{
base = 2;
rhs += 3;
flipSign = true;
}
- if (cmHasLiteralPrefix(rhs, "+0b"))
+ if (cmHasLiteralPrefix(rhs, "+0b") || cmHasLiteralPrefix(rhs, "+0B"))
{
base = 2;
rhs += 3;