diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-01-26 21:24:35 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-01-26 21:24:35 (GMT) |
commit | 5c8c6fa3da9f0e80fad858a4e7c10846a46cce38 (patch) | |
tree | 91a5c6a052b03c41ba0c8310a2883f9c8b2dbdbc | |
parent | dae3e140ae6936ca376551cbdf77a896049c8dab (diff) | |
download | CMake-5c8c6fa3da9f0e80fad858a4e7c10846a46cce38.zip CMake-5c8c6fa3da9f0e80fad858a4e7c10846a46cce38.tar.gz CMake-5c8c6fa3da9f0e80fad858a4e7c10846a46cce38.tar.bz2 |
ENH: Several windows bugs and fixes
-rw-r--r-- | Source/cmFileCommand.cxx | 9 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 17 |
2 files changed, 17 insertions, 9 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 0aae2e0..6d1fd19 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -240,7 +240,7 @@ bool cmFileCommand::HandleInstallCommand(std::vector<std::string> const& args) std::vector<std::string> files; int itype = cmTarget::INSTALL_FILES; - std::vector<std::string>::size_type i; + std::vector<std::string>::size_type i = 0; i++; // Get rid of subcommand std::string expr; @@ -344,9 +344,14 @@ bool cmFileCommand::HandleInstallCommand(std::vector<std::string> const& args) case cmTarget::EXECUTABLE: if ( !cmSystemTools::SetPermissions(destfile.c_str(), +#ifdef _MSC_VER + S_IREAD | S_IWRITE | S_IEXEC +#else S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | - S_IROTH | S_IXOTH ) ) + S_IROTH | S_IXOTH +#endif + ) ) { perror("problem doing chmod."); } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index e42520c..d0f92db 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -75,6 +75,7 @@ void cmLocalGenerator::GenerateInstallRules() } std::string file = m_Makefile->GetStartOutputDirectory(); + cmSystemTools::ConvertToUnixSlashes(file); file += "/cmake_install.cmake"; cmGeneratedFileStream tempFile(file.c_str()); std::ostream& fout = tempFile.GetStream(); @@ -116,6 +117,7 @@ void cmLocalGenerator::GenerateInstallRules() if (l->second.GetInstallPath() != "") { destination = prefix + l->second.GetInstallPath(); + cmSystemTools::ConvertToUnixSlashes(destination); const char* dest = destination.c_str(); int type = l->second.GetType(); @@ -129,14 +131,14 @@ void cmLocalGenerator::GenerateInstallRules() case cmTarget::MODULE_LIBRARY: fname = libOutPath; fname += this->GetFullTargetName(l->first.c_str(), l->second); - files = cmSystemTools::ConvertToOutputPath(fname.c_str()).c_str(); + files = fname.c_str(); this->AddInstallRule(fout, dest, type, files); break; case cmTarget::WIN32_EXECUTABLE: case cmTarget::EXECUTABLE: fname = exeOutPath; fname += this->GetFullTargetName(l->first.c_str(), l->second); - files = cmSystemTools::ConvertToOutputPath(fname.c_str()).c_str(); + files = fname.c_str(); this->AddInstallRule(fout, dest, type, files); break; case cmTarget::INSTALL_FILES: @@ -159,7 +161,7 @@ void cmLocalGenerator::GenerateInstallRules() f = f.substr(binaryPath.length()); } - files = cmSystemTools::ConvertToOutputPath(i->c_str()).c_str(); + files = i->c_str(); this->AddInstallRule(fout, dest, type, files); } } @@ -183,7 +185,7 @@ void cmLocalGenerator::GenerateInstallRules() { f = f.substr(binaryPath.length()); } - files = cmSystemTools::ConvertToOutputPath(i->c_str()).c_str(); + files = i->c_str(); this->AddInstallRule(fout, dest, type, files); } } @@ -203,8 +205,9 @@ void cmLocalGenerator::GenerateInstallRules() { std::string odir = mf->GetCurrentOutputDirectory(); odir += "/" + (*i); - fout << "INCLUDE(" << cmSystemTools::ConvertToOutputPath(odir.c_str()) - << "/cmake_install.cmake)" << std::endl; + cmSystemTools::ConvertToUnixSlashes(odir); + fout << "INCLUDE(" << odir.c_str() + << "/cmake_install.cmake)" << std::endl; } fout << std::endl;; } @@ -213,7 +216,7 @@ void cmLocalGenerator::GenerateInstallRules() void cmLocalGenerator::AddInstallRule(std::ostream& fout, const char* dest, int type, const char* files) { std::string sfiles = files; - std::string destination = cmSystemTools::ConvertToOutputPath(dest); + std::string destination = dest; std::string stype; switch ( type ) { |