[cmake-developers] kwsys SystemTools::RelativePath()

David Cole DLRdave at aol.com
Fri Oct 3 20:25:59 EDT 2014


Is the result of RelativePath guaranteed to be a directory name, or is
it possibly a file name....?

If a directory, then perhaps "." makes sense and wouldn't negatively
impact anything (other than cosmetically) if changed. But if a file,
then "." doesn't make as much sense. "." to me implies it is the
"current directory" or the "directory containing this thing" depending
on the context.

D


On Fri, Oct 3, 2014 at 3:30 PM, Nils Gladitz <nilsgladitz at gmail.com> wrote:
> On 03.10.2014 21:13, Brad King wrote:
>>
>> On 09/30/2014 10:05 AM, Nils Gladitz wrote:
>>>
>>> When both operands are the same absolute path I get the empty string as
>>> a result.
>>>
>>> Should it be "."?
>>
>> Perhaps.  One would need to track down existing call sites
>> to see where that might affect behavior.  IIRC it is exposed
>> through file(RELATIVE_PATH), so it may need a policy.  That
>> is probably overkill because there are legitimate use cases
>> where an empty string looks better than ".".
>
>
> I guess that might be a matter of definition.
> I wouldn't consider the empty string a valid path though I understand that
> this may be what people expect now given that this behavior has already been
> established.
>
> I've worked around the issue I had with the "wix-fix-root-dir-prop" topic
> for now so there is no immediate need to change behavior before the 3.1
> release.
>
> Thanks  for the feedback.
>
> Nils
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers



More information about the cmake-developers mailing list