summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2016-11-30 12:44:47 +0100
committerSebastian Holtermann <sebholt@xwmw.org>2016-12-06 15:59:26 +0100
commit273e481e48c855905bde4d91a986c06713df0183 (patch)
treeee488cb2d67aa2f6e38c5b1e1547f8e49e264c42 /Source
parent6f024008ce2bdf11bec1ff1174ee68f9a6da6fcb (diff)
downloadcmake-273e481e48c855905bde4d91a986c06713df0183.tar.gz
QtAutogen: Inline single use variable
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 1bdfe32eed..576b2eb443 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -682,13 +682,11 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
// create a custom target for running generators at buildtime:
std::string autogenTargetName = GetAutogenTargetName(target);
- std::string targetDir = GetAutogenTargetFilesDir(target);
-
cmCustomCommandLine currentLine;
currentLine.push_back(cmSystemTools::GetCMakeCommand());
currentLine.push_back("-E");
currentLine.push_back("cmake_autogen");
- currentLine.push_back(targetDir);
+ currentLine.push_back(GetAutogenTargetFilesDir(target));
currentLine.push_back("$<CONFIGURATION>");
cmCustomCommandLines commandLines;
@@ -850,8 +848,6 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget(
"_origin_target_name",
cmOutputConverter::EscapeForCMake(target->GetName()).c_str());
- std::string targetDir = GetAutogenTargetFilesDir(target);
-
const char* qtVersion = makefile->GetDefinition("Qt5Core_VERSION_MAJOR");
if (!qtVersion) {
qtVersion = makefile->GetDefinition("QT_VERSION_MAJOR");
@@ -894,7 +890,7 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget(
std::string inputFile = cmSystemTools::GetCMakeRoot();
inputFile += "/Modules/AutogenInfo.cmake.in";
- std::string outputFile = targetDir;
+ std::string outputFile = GetAutogenTargetFilesDir(target);
outputFile += "/AutogenInfo.cmake";
makefile->ConfigureFile(inputFile.c_str(), outputFile.c_str(), false, true,
false);