[Cmake] Re: [Dart] Configuration command, Symlinks in paths

Bill Hoffman bill.hoffman at kitware.com
Wed May 21 08:42:03 EDT 2003


I guess what I am saying, is that you are getting lucky.  
There has been no attempt in cmake to use relative paths, and
the -B -H is an unexpected behavior.  CMake depends on absolute paths,
and the method it uses to find absolute paths will unfortunately 
remove symlinks as well.    So, if you use any other libraries on
the system, they will be found by cmake in the realpath.   As long
as the project is self contained, I guess the -B -H options will
work, but they are not tested.  

I have been thinking that perhaps some sort of path translation table might
be a good feature.  This would be a file that could tell cmake, when you see
this path, always replace it with this.   Then, relative paths could be
done as well.    

-Bill
 

At 04:24 AM 5/21/2003, Stefan Schmidt wrote:
>On Tuesday 20 May 2003 15:19, Bill Hoffman wrote:
>> I don't think you can count on this behavior.    It would really depend
>> on the project.   There is no guarantee that all paths in the resulting
>> makefiles will preserve symlinks.   Many of the commands in cmake will
>> find the absolute path.  Future versions of cmake are not even
>> guaranteed to keep this same behavior, as it was unintended in the fist
>> place.
>
>Why is it unintended? 
>I really need this feature! There are symlinks in my filesystem pointing to 
>automounted NFS paths, which are not the same on each machine. But as I want 
>to use the compiled binaries on multiple machines, the compilation needs to 
>keep the common symlink in the path (it's an absolut path, not a relative 
>one). Otherwise the rpath in the binaries would be wrong, and when compiling 
>ITK, for example, even the configuration files ITKConfig.cmake would be 
>wrong.
>
>Stefan
>
>>
>> -Bill
>>
>> At 05:16 AM 5/20/2003, Stefan Schmidt wrote:
>> >Dear Dart maintainers,
>> >
>> >could we please change the Dart configuration file Utility.conf.in to call
>> >CMake with the -H and -B options? If CMake is called like this, it
>> > preserves the symlinks in the paths:
>> >
>> >ConfigureCommand: "@CMAKE_COMMAND@" -H at PROJECT_SOURCE_DIR@
>> >-B at PROJECT_BINARY_DIR@
>> >
>> >Thanks!
>> >Stefan Schmidt
>> >_______________________________________________
>> >Dart mailing list
>> >Dart at public.kitware.com
>> >http://public.kitware.com/mailman/listinfo/dart
>
>_______________________________________________
>Dart mailing list
>Dart at public.kitware.com
>http://public.kitware.com/mailman/listinfo/dart 






More information about the CMake mailing list