diff options
author | Brad King <brad.king@kitware.com> | 2017-09-29 12:52:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-09-29 12:53:13 (GMT) |
commit | 194dd9ea8b6fb8b73aa6484551e87bb7676015cc (patch) | |
tree | 56fae753a54c2f8faedf8d87d4c48bcbef244a13 /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | 460a94e29f19846bc219f8f8a02cddb196472be9 (diff) | |
parent | 93c8d55d049cacaa884d71b6c3177ce3757ab817 (diff) | |
download | CMake-194dd9ea8b6fb8b73aa6484551e87bb7676015cc.zip CMake-194dd9ea8b6fb8b73aa6484551e87bb7676015cc.tar.gz CMake-194dd9ea8b6fb8b73aa6484551e87bb7676015cc.tar.bz2 |
Merge topic 'autogen-macro-names2'
93c8d55d Autogen: Update (CMAKE_)AUTOMOC_MACRO_NAMES release notes
084ace47 Autogen: Tests: Update AUTOMOC_MACRO_NAMES test
08041dd1 Autogen: Doc: Update documentation for (CMAKE_)AUTOMOC_MACRO_NAMES
7b33d67b Autogen: Create info file directory before writing
786b5be0 Autogen: Define all macro names in CMAKE_AUTOMOC_MACRO_NAMES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1321
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 1ce350f..c6f0a51 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -613,6 +613,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( cmGlobalGenerator* globalGen = localGen->GetGlobalGenerator(); std::string const autogenTargetName = GetAutogenTargetName(target); + std::string const autogenInfoDir = GetAutogenTargetFilesDir(target); std::string const autogenBuildDir = GetAutogenTargetBuildDir(target); std::string const workingDirectory = cmSystemTools::CollapseFullPath("", makefile->GetCurrentBinaryDirectory()); @@ -630,8 +631,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( AddCleanFile(makefile, autogenBuildDir); // Remove old settings on cleanup { - std::string base = GetAutogenTargetFilesDir(target); - base += "/AutogenOldSettings"; + std::string base = autogenInfoDir + "/AutogenOldSettings"; if (multiConfig == cmQtAutoGen::SINGLE) { AddCleanFile(makefile, base.append(".cmake")); } else { @@ -652,7 +652,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( currentLine.push_back(cmSystemTools::GetCMakeCommand()); currentLine.push_back("-E"); currentLine.push_back("cmake_autogen"); - currentLine.push_back(GetAutogenTargetFilesDir(target)); + currentLine.push_back(autogenInfoDir); currentLine.push_back("$<CONFIGURATION>"); commandLines.push_back(currentLine); } @@ -1097,8 +1097,13 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget( // Generate info file { - std::string infoFile = GetAutogenTargetFilesDir(target); - infoFile += "/AutogenInfo.cmake"; + std::string const infoDir = GetAutogenTargetFilesDir(target); + if (!cmSystemTools::MakeDirectory(infoDir)) { + std::string emsg = ("Could not create directory: "); + emsg += cmQtAutoGen::Quoted(infoDir); + cmSystemTools::Error(emsg.c_str()); + } + std::string const infoFile = infoDir + "/AutogenInfo.cmake"; { std::string infoFileIn = cmSystemTools::GetCMakeRoot(); infoFileIn += "/Modules/AutogenInfo.cmake.in"; |