[cmake-developers] patch for module GetPrerequisites

Benjamin Ballet bballet at ivsweb.com
Mon Mar 7 17:41:43 EST 2016


We have to call :
fixup_bundle("${CMAKE_INSTALL_PREFIX}/../test"...
to fix an optional test folder installed near the app.

verify_app will later compare a path like C:/program/app/../test to
C:/program/test and state they are inequal while they point to the same
file.
That's why I have to call get_filename_component(path "${path}" REALPATH)
just to force the convertion from C:/program/app/../test to C:/program/test

Thanks, hope I clearified

2016-03-07 19:07 GMT+01:00 Brad King <brad.king at kitware.com>:

> On 03/04/2016 12:17 PM, Benjamin Ballet wrote:
> > The fail occurs during verify_app in the function gp_resolved_file_type
> > from module GetPrerequisites. This function test if two paths are equal
> > without translating them to there canonical form before.
> [snip]
> >        get_filename_component(original_path "${original_lower}" PATH)
> >        get_filename_component(path "${lower}" PATH)
> > +      get_filename_component(original_path "${original_path}" REALPATH)
> > +      get_filename_component(path "${path}" REALPATH)
>
> This is operating on a string(TOLOWER)-converted path already.
> On case-sensitive filesystems it does not make sense to call
> REALPATH for these.  The code is doing string manipulation of
> the paths at this point.
>
> Please explain the case you're hitting in more detail.  How
> does one end up with a non-canonical path in the first place?
>
> Thanks,
> -Brad
>
>


-- 
*Benjamin BALLET*
Ingénieur R&D

*ACTIVISU*
19, rue Klock - 92110 Clichy
*> Standard Tél* :  01 44 69 37 37
*>* www.activisu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160307/a3b49ebe/attachment.html>


More information about the cmake-developers mailing list