diff options
author | Brad King <brad.king@kitware.com> | 2015-02-26 20:06:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-26 20:06:00 (GMT) |
commit | 693a944736aca153504d26fb621933219b715210 (patch) | |
tree | 397213b93a37c413d9eb2aacd95a1f1ceecb568e /Source | |
parent | cd935b03bfee380f6d2a3999dbc9bf6f929485bc (diff) | |
parent | c48141744e7b14940dc55ec98da631c4d2356dd7 (diff) | |
download | CMake-693a944736aca153504d26fb621933219b715210.zip CMake-693a944736aca153504d26fb621933219b715210.tar.gz CMake-693a944736aca153504d26fb621933219b715210.tar.bz2 |
Merge branch 'install-manifest-optimize' into release
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 5 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 17 |
2 files changed, 10 insertions, 12 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 579e715..d994659 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1907,7 +1907,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); } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7ca7684..d9dcad4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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"; } } |