[CMake] FindMKL.cmake
Michael Wild
themiwi at gmail.com
Wed Feb 9 10:48:51 EST 2011
On 02/09/2011 04:41 PM, Robert Bielik wrote:
> David Cole skrev 2011-02-09 16:32:
>> 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()
>
> Hmm... doesn't work. find(...) doesn't return directories, only files... :(
>
> /Rob
what about this:
file(GLOB_RECURSE glob_results "/some/pattern*")
set(dirs)
foreach(f IN LISTS glob_results)
get_filename_component(d "${f}" PATH)
list(APPEND dirs "${d}")
endforeach()
list(REMOVE_DUPLICATES dirs)
Michael
More information about the CMake
mailing list