summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-22 14:40:26 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-22 14:41:10 (GMT)
commitf2c8ff825995c1425a134e24eee6c4fb73c3a6b2 (patch)
tree2829ed85d6d0139e2221257726d5df8f8b78afe2 /Source/cmGeneratorExpressionNode.cxx
parent7f83e8033bd30ad112989f7dc17840fdf497586b (diff)
downloadCMake-f2c8ff825995c1425a134e24eee6c4fb73c3a6b2.zip
CMake-f2c8ff825995c1425a134e24eee6c4fb73c3a6b2.tar.gz
CMake-f2c8ff825995c1425a134e24eee6c4fb73c3a6b2.tar.bz2
cmGeneratorExpressionNode: Simplify static string constant
Use our `""_s` user-defined literal to avoid initializing a static std::string.
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index af409e4..1d3295d 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -21,10 +21,13 @@
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
+#include "cm_static_string_view.hxx"
+#include "cm_string_view.hxx"
#include "cmake.h"
#include "cmsys/RegularExpression.hxx"
#include "cmsys/String.h"
+
#include <algorithm>
#include <assert.h>
#include <errno.h>
@@ -1328,8 +1331,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
"Target name not supported.");
return std::string();
}
- static const std::string propALIASED_TARGET = "ALIASED_TARGET";
- if (propertyName == propALIASED_TARGET) {
+ if (propertyName == "ALIASED_TARGET"_s) {
if (context->LG->GetMakefile()->IsAlias(targetName)) {
if (cmGeneratorTarget* tgt =
context->LG->FindGeneratorTargetToUse(targetName)) {