FILE(RELATIVE_PATH outvar sourcedir destfile)

expects both sourcdir and destfile to be absolute ("full").  If either is
not absolute, an error message is emitted about sourcedir (where we should
be emitting an error a about sourcedir if it's relative, or destfile if
that's relative).

Patch attached for that trivial fix.  

I also wonder if the behavior should be changed so that 
FILE(RELATIVE_PATH foo "/usr/local/share" "foo/bar") 
yields foo == "/usr/local/share/foo/bar"
rather than producing an error message.

-- 
[EMAIL PROTECTED] | yodel us by to come
         http://docs.yahoo.com/info/values/

diff -dur cmake-2.4.1.orig/Source/cmFileCommand.cxx 
cmake-2.4.1/Source/cmFileCommand.cxx
--- cmake-2.4.1.orig/Source/cmFileCommand.cxx   Sun Apr 30 09:06:34 2006
+++ cmake-2.4.1/Source/cmFileCommand.cxx        Wed May 10 12:43:53 2006
@@ -924,7 +924,7 @@
     }
   if(!cmSystemTools::FileIsFullPath(fileName.c_str()))
     {
-    std::string errstring = "RelativePath must be passed a full path to the 
directory: " + directoryName;
+    std::string errstring = "RelativePath must be passed a full path to the 
file: " + fileName;
     this->SetError(errstring.c_str());
     return false;
     }
Only in cmake-2.4.1/Source: cmFileCommand.cxx~
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to