On Sun, 2010-02-21 at 16:37 +0100, Alexander Neundorf wrote:
> On Friday 19 February 2010, Marcel Loose wrote:
> > Hi all,
> >
> > I've noticed a problematic behaviour with the FIND_XXX macros when
using
> > ENV in either PATHS or HINTS: symbolic links get converted to the
real
> > paths. This happens with cmake 2.6.x and 2.8.0. Is this a bug?
> 
> No.
> 
> Ok, longer answer: why do you think this is bad ?
> 
> Alex

I think it's bad for at least two reasons:

1) Consistency! 
It happens when using ENV, but not when hard-coding the exact same path.
See my example, where using "HINTS ENV HDF5_ROOT" (with HDF5_ROOT set to
'/opt/hdf5') resulted in the symlink being converted to a real path,
whereas using "HINTS /opt/hdf5" did not result in a real path. 

2) The symlink exists for a reason! 
The build is done on a cluster front-end node, which provides access to
third-party software for the compute nodes using NFS. So, for example,
HDF5 resides in the directory '/data/sys/opt/hdf5' on the front-end
node. The compute nodes, however, see this directory as '/opt/hdf5'.
Therefore, on the front node, a symlink "/opt/hdf5
-> /data/sys/opt/hdf5" exists. Translating '/opt/hdf5' into the real
path results in the compute nodes not being able to locate the required
shared libraries.

IMHO, CMake should not mess with symlinks. 

Best regards,
Marcel Loose.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to