diff options
author | Brad King <brad.king@kitware.com> | 2009-02-04 15:34:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-04 15:34:10 (GMT) |
commit | a27e9ca4a2fe780ab10d11fdf3759e0c8d76a0d3 (patch) | |
tree | 191aab6a75fd5c42bd9309059e6852c02a4dcca6 | |
parent | 2d662e0083d415710ff41497fd11b2e8d524e4de (diff) | |
download | CMake-a27e9ca4a2fe780ab10d11fdf3759e0c8d76a0d3.zip CMake-a27e9ca4a2fe780ab10d11fdf3759e0c8d76a0d3.tar.gz CMake-a27e9ca4a2fe780ab10d11fdf3759e0c8d76a0d3.tar.bz2 |
BUG: Fix old-style install to prefix top
The old install_files, install_programs, and install_targets commands
used to permit installation to the top of the prefix by specifying
destination '/'. This was broken in 2.6.0 to 2.6.2 by changes to
enforce valid destinations that did not account for this case. This
change fixes the case by converting the install destination to '.' which
is the new-style way to specify the top of the installation prefix.
-rw-r--r-- | Source/cmInstallFilesCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmInstallProgramsCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index a352244..5cfb08e 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -125,6 +125,10 @@ void cmInstallFilesCommand::CreateInstallGenerator() const // the prefix. We skip the leading slash given by the user. std::string destination = this->Destination.substr(1); cmSystemTools::ConvertToUnixSlashes(destination); + if(destination.empty()) + { + destination = "."; + } // Use a file install generator. const char* no_permissions = ""; diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index d7557d0..989490e 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -86,6 +86,10 @@ void cmInstallProgramsCommand::FinalPass() // the prefix. We skip the leading slash given by the user. std::string destination = this->Destination.substr(1); cmSystemTools::ConvertToUnixSlashes(destination); + if(destination.empty()) + { + destination = "."; + } // Use a file install generator. const char* no_permissions = ""; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 141e934..c496686 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2377,6 +2377,10 @@ cmLocalGenerator // We also skip over the leading slash given by the user. std::string destination = l->second.GetInstallPath().substr(1); cmSystemTools::ConvertToUnixSlashes(destination); + if(destination.empty()) + { + destination = "."; + } // Generate the proper install generator for this target type. switch(l->second.GetType()) |