diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 0ab47879b2df7bc5aefc56f5ca30c219362fd6a8..7589520f55678067ba58b4488743900d785ded20 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2303,7 +2303,7 @@ static bool cmLocalGeneratorNotAbove(const char* a, const char* b)
 //----------------------------------------------------------------------------
 std::string
 cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local,
-                                        const char* in_remote)
+                                        const char* in_remote, bool force)
 {
   // The path should never be quoted.
   assert(in_remote[0] != '\"');
@@ -2324,19 +2324,22 @@ cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local,
     this->RelativePathsConfigured = true;
     }
 
-  // Skip conversion if the path and local are not both in the source
-  // or both in the binary tree.
-  std::string local_path = cmSystemTools::JoinPath(local);
-  if(!((cmLocalGeneratorNotAbove(local_path.c_str(),
-                                 this->RelativePathTopBinary.c_str()) &&
-        cmLocalGeneratorNotAbove(in_remote,
-                                 this->RelativePathTopBinary.c_str())) ||
-       (cmLocalGeneratorNotAbove(local_path.c_str(),
-                                 this->RelativePathTopSource.c_str()) &&
-        cmLocalGeneratorNotAbove(in_remote,
-                                 this->RelativePathTopSource.c_str()))))
+  if(!force)
     {
-    return in_remote;
+    // Skip conversion if the path and local are not both in the source
+    // or both in the binary tree.
+    std::string local_path = cmSystemTools::JoinPath(local);
+    if(!((cmLocalGeneratorNotAbove(local_path.c_str(),
+                                   this->RelativePathTopBinary.c_str()) &&
+          cmLocalGeneratorNotAbove(in_remote,
+                                   this->RelativePathTopBinary.c_str())) ||
+         (cmLocalGeneratorNotAbove(local_path.c_str(),
+                                   this->RelativePathTopSource.c_str()) &&
+          cmLocalGeneratorNotAbove(in_remote,
+                                   this->RelativePathTopSource.c_str()))))
+      {
+      return in_remote;
+      }
     }
 
   // Identify the longest shared path component between the remote
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index a1046adb7a417e219bdb3a672595c8a921cf7e0a..43521fa28d3d774ae3382571cd59dee611a43040 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -260,7 +260,7 @@ public:
    * or quoted.
    */
   std::string ConvertToRelativePath(const std::vector<std::string>& local,
-                                    const char* remote);
+                                    const char* remote, bool force=false);
 
   /**
    * Get the relative path from the generator output directory to a