[cmake-developers] [CMake 0013204]: Docs don't say what happens to symlinks in copy_directory

Mantis Bug Tracker mantis at public.kitware.com
Tue Aug 14 11:22:24 EDT 2012


The following issue is now in status NEW (again) 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13204 
====================================================================== 
Reported By:                Dave Abrahams
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13204
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
Target Version:             CMake 2.8.10
====================================================================== 
Date Submitted:             2012-05-09 09:43 EDT
Last Modified:              2012-08-14 11:22 EDT
====================================================================== 
Summary:                    Docs don't say what happens to symlinks in
copy_directory
Description: 
Most facilities that copy whole directory trees say what they do with symbolic
links (i.e. follow or not).  The docs for copy_directory don't.  I don't know if
this applies elsewhere, but a quick scan for similar omissions might be
worthwhile.
====================================================================== 

---------------------------------------------------------------------- 
 (0029644) recryn (reporter) - 2012-06-08 05:30
 http://www.cmake.org/Bug/view.php?id=13204#c29644 
---------------------------------------------------------------------- 
'cmake -E copy_directory some_dir dest_dir' does follow symlinks. That means it
does not copy symlinks but the files or directories they point to.

I would consider this a bug since 'file (COPY some_dir DESTINATION dest_dir)'
copies symlinks without following them. Because of the limitation of
copy_directory you have to work around this by creating a custom copydir.cmake
script,

--------8<-------------------------------------------------------
# copydir.cmake
# note the trailing slash after ${SOURCE_DIR}
file (COPY "${SOURCE_DIR}/" DESTINATION "${TARGET_DIR}")
------------------------------------------------------->8--------

and call this script instead of 'cmake -E copy_directory', e.g.;
cmake -DSOURCE_DIR=some_dir -DTARGET_DIR=dest_dir -P copydir.cmake 

---------------------------------------------------------------------- 
 (0030434) David Cole (manager) - 2012-08-11 21:42
 http://www.cmake.org/Bug/view.php?id=13204#c30434 
---------------------------------------------------------------------- 
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means
that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have
been addressed in a different manner, please bring it up on the CMake mailing
list for discussion. Sign up for the mailing list here, if you're not already on
it: http://www.cmake.org/mailman/listinfo/cmake

It's easy to re-activate a bug here if you can find a CMake developer who has
the bandwidth to take it on, and ferry a fix through to our 'next' branch for
dashboard testing.
 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-05-09 09:43 Dave Abrahams  New Issue                                    
2012-06-08 05:25 recryn         Issue Monitored: recryn                      
2012-06-08 05:30 recryn         Note Added: 0029644                          
2012-08-11 21:42 David Cole     Status                   new => backlog      
2012-08-11 21:42 David Cole     Note Added: 0030434                          
2012-08-14 11:22 David Cole     Status                   backlog => new      
2012-08-14 11:22 David Cole     Target Version            => CMake 2.8.10    
======================================================================




More information about the cmake-developers mailing list