Merge topic 'install-manifest-optimize'

c4814174 install: Write the entire installation manifest at once
This commit is contained in:
Brad King 2015-02-27 10:34:35 -05:00 committed by CMake Topic Stage
commit 38f1f4e7f3
2 changed files with 10 additions and 12 deletions

View File

@ -1903,7 +1903,10 @@ protected:
std::string Manifest;
void ManifestAppend(std::string const& file)
{
this->Manifest += ";";
if (!this->Manifest.empty())
{
this->Manifest += ";";
}
this->Manifest += file.substr(this->DestDirLength);
}

View File

@ -535,17 +535,12 @@ void cmLocalGenerator::GenerateInstallRules()
"${CMAKE_INSTALL_COMPONENT}.txt\")\n"
"else()\n"
" set(CMAKE_INSTALL_MANIFEST \"install_manifest.txt\")\n"
"endif()\n\n";
fout
<< "file(WRITE \""
<< homedir << "/${CMAKE_INSTALL_MANIFEST}\" "
<< "\"\")" << std::endl;
fout
<< "foreach(file ${CMAKE_INSTALL_MANIFEST_FILES})" << std::endl
<< " file(APPEND \""
<< homedir << "/${CMAKE_INSTALL_MANIFEST}\" "
<< "\"${file}\\n\")" << std::endl
<< "endforeach()" << std::endl;
"endif()\n"
"\n"
"string(REPLACE \";\" \"\\n\" CMAKE_INSTALL_MANIFEST_CONTENT\n"
" \"${CMAKE_INSTALL_MANIFEST_FILES}\")\n"
"file(WRITE \"" << homedir << "/${CMAKE_INSTALL_MANIFEST}\"\n"
" \"${CMAKE_INSTALL_MANIFEST_CONTENT}\")\n";
}
}