[CMake] FindMKL.cmake

David Cole david.cole at kitware.com
Wed Feb 9 10:32:06 EST 2011


On Wed, Feb 9, 2011 at 9:15 AM, Robert Bielik <robert.bielik at xponaut.se>wrote:

> David Cole skrev 2011-02-09 14:31:
>
>     Is there some way I can make file(GLOB_RECURSE... ) start at a
>> directory of my choice (instead of the current CMakeLists.txt folder) ?
>>
>>
>> file(GLOB_RECURSE .... "${dir}/*")
>>
>
> Yes, and that will return file names. Would be nice to have a directive
> CMAKE_DIRECTORIES_ONLY to only return globbed paths...



You can iterate the returned list something like this to accumulate just
directory names:

set(dirs "")
foreach(f ${glob_results})
  if(IS_DIRECTORY "${f}")
    set(dirs ${dirs} ${f})
  endif()
endforeach()



>
>
>> None of the find_* commands do recursion...
>>
>
> ...which then could be fed to find_*
>
>
> /Rob
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110209/3585d05b/attachment.htm>


More information about the CMake mailing list