summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx9
1 files changed, 7 insertions, 2 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.");
}