Revision: 69059

Author:   brlcad
Date:     2016-10-14 14:56:02 +0000 (Fri, 14 Oct 2016)
Log Message:
bit again.  remove dead symlinks so removed/renamed files don't mess with the 
build (e.g., when a tclIndex needs to be regenerated).  if it globs but doesn't 
exist, it's a dead link and useless in the build tree regardless.  copies are 
left to fend for themselves (and don't exhibit the same problems).

Modified Paths:

Modified: brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake
--- brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake        2016-10-14 14:55:51 UTC 
(rev 69058)
+++ brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake        2016-10-14 14:56:02 UTC 
(rev 69059)
@@ -764,6 +764,15 @@
     endforeach(filename ${fullpath_datalist})
+    # check for and remove any dead symbolic links from a previous run
+    file(GLOB listing LIST_DIRECTORIES false 
+    foreach (filename ${listing})
+      if (NOT EXISTS ${filename})
+       message("Removing stale symbolic link ${filename}")
+       execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${filename})
+      endif (NOT EXISTS ${filename})
+    endforeach (filename ${listing})
     # The custom command is still necessary - since it depends on the original 
source files,
     # this will be the trigger that tells other commands depending on this 
data that
     # they need to re-run one one of the source files is changed.

This was sent by the collaborative development platform, the 
world's largest Open Source development site.

Check out the vibrant tech community on one of the world's most 
engaging tech sites,!
BRL-CAD Source Commits mailing list

Reply via email to