[Cmake-commits] [cmake-commits] david.cole committed cmFileCommand.cxx 1.111 1.112 cmFileCommand.h 1.37 1.38

cmake-commits at cmake.org cmake-commits at cmake.org
Sat Aug 23 13:33:17 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv31626/Source

Modified Files:
	cmFileCommand.cxx cmFileCommand.h 
Log Message:
ENH: Add the RECURSE_SYMLINKS_OFF flag to the FILE GLOB_RECURSE command. Exposes the recently added kwsys capability that prevents recursing through symlinks to CMake scripts.


Index: cmFileCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -C 2 -d -r1.37 -r1.38
*** cmFileCommand.h	30 Apr 2008 17:42:38 -0000	1.37
--- cmFileCommand.h	23 Aug 2008 17:33:13 -0000	1.38
***************
*** 78,82 ****
        "  file(GLOB variable [RELATIVE path] [globbing expressions]...)\n"
        "  file(GLOB_RECURSE variable [RELATIVE path] \n"
!       "       [globbing expressions]...)\n"
        "  file(REMOVE [file1 ...])\n"
        "  file(REMOVE_RECURSE [file1 ...])\n"
--- 78,82 ----
        "  file(GLOB variable [RELATIVE path] [globbing expressions]...)\n"
        "  file(GLOB_RECURSE variable [RELATIVE path] \n"
!       "       [RECURSE_SYMLINKS_OFF] [globbing expressions]...)\n"
        "  file(REMOVE [file1 ...])\n"
        "  file(REMOVE_RECURSE [file1 ...])\n"
***************
*** 127,131 ****
        "GLOB_RECURSE will generate similar list as the regular GLOB, except "
        "it will traverse all the subdirectories of the matched directory and "
!       "match the files.\n"
        "Examples of recursive globbing include:\n"
        "   /dir/*.py  - match all python files in /dir and subdirectories\n"
--- 127,133 ----
        "GLOB_RECURSE will generate similar list as the regular GLOB, except "
        "it will traverse all the subdirectories of the matched directory and "
!       "match the files. Subdirectories that are symlinks are traversed by "
!       "default to match the behavior or older CMake releases. Use "
!       "RECURSE_SYMLINKS_OFF to prevent recursion through symlinks.\n"
        "Examples of recursive globbing include:\n"
        "   /dir/*.py  - match all python files in /dir and subdirectories\n"

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.111
retrieving revision 1.112
diff -C 2 -d -r1.111 -r1.112
*** cmFileCommand.cxx	14 Aug 2008 13:53:26 -0000	1.111
--- cmFileCommand.cxx	23 Aug 2008 17:33:13 -0000	1.112
***************
*** 673,676 ****
--- 673,688 ----
    for ( ; i != args.end(); ++i )
      {
+     if ( *i == "RECURSE_SYMLINKS_OFF" )
+       {
+       g.RecurseThroughSymlinksOff();
+       ++i;
+       if ( i == args.end() )
+         {
+         this->SetError(
+           "GLOB requires a glob expression after RECURSE_SYMLINKS_OFF");
+         return false;
+         }
+       }
+ 
      if ( *i == "RELATIVE" )
        {
***************
*** 689,692 ****
--- 701,705 ----
          }
        }
+ 
      if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
        {
***************
*** 707,710 ****
--- 720,724 ----
        g.FindFiles(*i);
        }
+ 
      std::vector<std::string>::size_type cc;
      std::vector<std::string>& files = g.GetFiles();



More information about the Cmake-commits mailing list