[CMake] Not resolving Symlinks at all

Michael Jackson mike.jackson at bluequartz.net
Tue Feb 26 10:52:36 EST 2013


I have the following code:

message(STATUS "Found HDFLibrary ${HDF5_LIBRARY_RELEASE}")

if(IS_SYMLINK ${HDF_LIBRARY_DEBUG})
  message(STATUS "SYMLINK: ${HDF_LIBRARY_DEBUG}")
  get_filename_component(test ${HDF_LIBRARY_DEBUG} REALPATH)
  message(STATUS "Real Path: ${test}")
endif()
if(IS_SYMLINK ${HDF_LIBRARY_RELEASE})
  message(STATUS "SYMLINK: ${HDF_LIBRARY_RELEASE}")
  get_filename_component(test ${HDF_LIBRARY_RELEASE} REALPATH)
  message(STATUS "Real Path: ${test}")
endif()

The issue is that I am not dropping into the "IF(IS_SYMLINK)"
conditional. The HDF5_LIBRARY_RELEASE is
/home/mjackson/DREAM3D_SDK/hdf5-1.8.10/lib/libhdf5.so and if we do an
"ls" on the parent directory we get this:

lrwxrwxrwx. 1 mjackson mjackson      22 Feb 26 10:41 libhdf5_debug.so
-> libhdf5_debug.so.7.4.0*
-rwxr-xr-x. 1 mjackson mjackson 8688176 Feb 26 10:41 libhdf5_debug.so.1.8.10*
lrwxrwxrwx. 1 mjackson mjackson      23 Feb 26 10:41
libhdf5_debug.so.7.4.0 -> libhdf5_debug.so.1.8.10*
lrwxrwxrwx. 1 mjackson mjackson      16 Feb 26 08:57 libhdf5.so ->
libhdf5.so.7.4.0*
-rwxr-xr-x. 1 mjackson mjackson 3076781 Feb 26 08:53 libhdf5.so.1.8.10*
lrwxrwxrwx. 1 mjackson mjackson      17 Feb 26 08:57 libhdf5.so.7.4.0
-> libhdf5.so.1.8.10


So the file pointed to by HDF5_LIBRARY_RELEASE really is a symlink but
CMake does not seem to think so? This is on CentOS 6 Fully patched
using self built CMake 2.8.10.1

Any help is appreciated. BTW - The same code works just fine on OS X.
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio


More information about the CMake mailing list