file timestamp with symbolic link under Windows

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

file timestamp with symbolic link under Windows

Hello CMakers,

I recently switched from CMake 2.8.12 to 3.8.2 and the behaviour of 

file(TIMESTAMP MyFile MyFileTimestamp) 

changed when MyFileis a symbolic link under Windows.

In 2.8.12 the funtion was reporting of the actual file timestamp pointed by the symbolic link.
In 3.8.2 the funcitons returns the symbolic link itself timpestamp.

Has this behaviour changed intentionally? I do not find anything related in the change logs.

Trying to workaround this issue, I stumbled upon get_filename_component function which I can use to get the realpath of a symbolic link but when I use it as:

get_filename_component(MyFileRealPath ${MyFile} REALPATH)

MyFileRealPath contains the symbolic link path, not the real path!. I am currently digging in cmake source code and considering reporting as a bug.

Any comments will be warmly welcomed.



Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: