diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-08-09 18:50:17 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-08-09 18:50:17 (GMT) |
commit | c530e2f74ff466b43651372d56bae543eec1a9f1 (patch) | |
tree | 6f3762cfef1f404bc8c9ee5b6efa1a865e970591 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | ad4452d1bdabcdf039f812f2b709a905d76e8da0 (diff) | |
download | CMake-c530e2f74ff466b43651372d56bae543eec1a9f1.zip CMake-c530e2f74ff466b43651372d56bae543eec1a9f1.tar.gz CMake-c530e2f74ff466b43651372d56bae543eec1a9f1.tar.bz2 |
cmCompiledGeneratorExpression::Evaluate(): return const std::string&
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 41567a3..553c78e 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1742,10 +1742,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1, e2.Element("Link", deployLocation + "\\%(FileName)%(Extension)"); } for (size_t i = 0; i != this->Configurations.size(); ++i) { - if (0 == - strcmp( - cge->Evaluate(this->LocalGenerator, this->Configurations[i]), - "1")) { + if (cge->Evaluate(this->LocalGenerator, this->Configurations[i]) == + "1") { e2.WritePlatformConfigTag("DeploymentContent", "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] + "|" + @@ -1793,14 +1791,14 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1, ge.Parse(shaderEnableDebug); for (size_t i = 0; i != this->Configurations.size(); ++i) { - const char* enableDebug = + const std::string& enableDebug = cge->Evaluate(this->LocalGenerator, this->Configurations[i]); - if (strlen(enableDebug) > 0) { + if (!enableDebug.empty()) { e2.WritePlatformConfigTag( "EnableDebuggingInformation", "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] + "|" + this->Platform + "'", - cmSystemTools::IsOn(enableDebug) ? "true" : "false"); + cmSystemTools::IsOn(enableDebug.c_str()) ? "true" : "false"); } } } @@ -1810,14 +1808,15 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1, ge.Parse(shaderDisableOptimizations); for (size_t i = 0; i != this->Configurations.size(); ++i) { - const char* disableOptimizations = + const std::string& disableOptimizations = cge->Evaluate(this->LocalGenerator, this->Configurations[i]); - if (strlen(disableOptimizations) > 0) { + if (!disableOptimizations.empty()) { e2.WritePlatformConfigTag( "DisableOptimizations", "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] + "|" + this->Platform + "'", - (cmSystemTools::IsOn(disableOptimizations) ? "true" : "false")); + (cmSystemTools::IsOn(disableOptimizations.c_str()) ? "true" + : "false")); } } } |