Browse Source

BUG: RENAME option should be allowd for INSTALL(PROGRAMS) too.

Brad King 19 years ago
parent
commit
ba9c97ccec
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Source/cmFileCommand.cxx

+ 4 - 2
Source/cmFileCommand.cxx

@@ -855,9 +855,11 @@ bool cmFileCommand::HandleInstallCommand(
   // Check rename form.
   // Check rename form.
   if(!rename.empty())
   if(!rename.empty())
     {
     {
-    if(itype != cmTarget::INSTALL_FILES)
+    if(itype != cmTarget::INSTALL_FILES &&
+       itype != cmTarget::INSTALL_PROGRAMS)
       {
       {
-      this->SetError("INSTALL option RENAME may be used only with FILES.");
+      this->SetError("INSTALL option RENAME may be used only with "
+                     "FILES or PROGRAMS.");
       return false;
       return false;
       }
       }
     if(files.size() > 1)
     if(files.size() > 1)