summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-06 22:44:53 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-07 12:35:16 (GMT)
commit00ba28ffd03a9a0cf00d78001573bc5cc045ee72 (patch)
treebb8c241b1938470badd41ecf2499a48317b11e1d /Source/cmMakefileTargetGenerator.cxx
parent0741eda2468e482baf1b5ff6a3a8d376143171e4 (diff)
downloadCMake-00ba28ffd03a9a0cf00d78001573bc5cc045ee72.zip
CMake-00ba28ffd03a9a0cf00d78001573bc5cc045ee72.tar.gz
CMake-00ba28ffd03a9a0cf00d78001573bc5cc045ee72.tar.bz2
cmMakefile::GetRequiredDefinition: return const std::string&
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index af34169..cfaa1fd9 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -654,19 +654,20 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
std::string cmdVar;
if (this->GeneratorTarget->GetPropertyAsBool(
"CUDA_SEPARABLE_COMPILATION")) {
- cmdVar = std::string("CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION");
+ cmdVar = "CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION";
} else if (this->GeneratorTarget->GetPropertyAsBool(
"CUDA_PTX_COMPILATION")) {
- cmdVar = std::string("CMAKE_CUDA_COMPILE_PTX_COMPILATION");
+ cmdVar = "CMAKE_CUDA_COMPILE_PTX_COMPILATION";
} else {
- cmdVar = std::string("CMAKE_CUDA_COMPILE_WHOLE_COMPILATION");
+ cmdVar = "CMAKE_CUDA_COMPILE_WHOLE_COMPILATION";
}
- std::string compileRule = this->Makefile->GetRequiredDefinition(cmdVar);
+ const std::string& compileRule =
+ this->Makefile->GetRequiredDefinition(cmdVar);
cmSystemTools::ExpandListArgument(compileRule, compileCommands);
} else {
- const std::string cmdVar =
- std::string("CMAKE_") + lang + "_COMPILE_OBJECT";
- std::string compileRule = this->Makefile->GetRequiredDefinition(cmdVar);
+ const std::string cmdVar = "CMAKE_" + lang + "_COMPILE_OBJECT";
+ const std::string& compileRule =
+ this->Makefile->GetRequiredDefinition(cmdVar);
cmSystemTools::ExpandListArgument(compileRule, compileCommands);
}