On Thu, Feb 10, 2011 at 2:50 AM, Robert Bielik robert.bie...@xponaut.sewrote:
Michael Wild skrev 2011-02-09 16:48:
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})
On Thu, Feb 10, 2011 at 8:01 AM, Michael Wild them...@gmail.com wrote:
On 02/10/2011 01:52 PM, David Cole wrote:
On Thu, Feb 10, 2011 at 2:50 AM, Robert Bielik robert.bie...@xponaut.se
wrote:
Michael Wild skrev 2011-02-09 16:48:
what about this:
file(GLOB_RECURSE glob_results
Hi all,
I'm trying to make a FindMKL.cmake file (for Intel MKL) to handle Windows and
Mac OS X primarily. However, I thought that CMake would find my
FindMKL.cmake file if being in the same directory as the calling CMakeLists.txt
file ? Can I make CMake find the file without having to resort
On 02/09/2011 01:50 PM, Robert Bielik wrote:
Hi all,
I'm trying to make a FindMKL.cmake file (for Intel MKL) to handle
Windows and Mac OS X primarily. However, I thought that CMake would find my
FindMKL.cmake file if being in the same directory as the calling
CMakeLists.txt file ? Can I
Michael Wild skrev 2011-02-09 14:07:
that's what the CMAKE_MODULE_PATH variable is for. And there is a
FindLAPACK.cmake should already find Intel MKL, however IMHO the whole
module is rather broken...
Thnx Michael, I found that seconds after pressing the send button :) Thanks for
pointing to
On Wed, Feb 9, 2011 at 8:20 AM, Robert Bielik robert.bie...@xponaut.sewrote:
Michael Wild skrev 2011-02-09 14:07:
that's what the CMAKE_MODULE_PATH variable is for. And there is a
FindLAPACK.cmake should already find Intel MKL, however IMHO the whole
module is rather broken...
Thnx
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
On Wed, Feb 9, 2011 at 9:15 AM, Robert Bielik robert.bie...@xponaut.sewrote:
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}/*)
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()
Yes, not bad. Good idea, thnx.
/Rob
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
What does this return if you save it as glob.cmake and then run cmake -P
glob.cmake ??
file(GLOB results /*)
set(dirs )
foreach(f ${results})
if(IS_DIRECTORY ${f})
set(dirs ${dirs} ${f})
message(directory: '${f}')
else()
message(file: '${f}')
endif()
endforeach()
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()
Ah I know what it is. If you use GLOB_RECURSE you only get files
because the directories are recursed into.
You have to use GLOB alone and do the recursion manually if you want to
descend into found directories... Painful. But still possible.
On Wed, Feb 9, 2011 at 10:48 AM, David Cole
David Cole skrev 2011-02-09 16:49:
Ah I know what it is. If you use GLOB_RECURSE you only get files because
the directories are recursed into.
You have to use GLOB alone and do the recursion manually if you want to descend
into found directories... Painful. But still possible.
Something
Michael Wild skrev 2011-02-09 16:48:
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)
Yeah, works fine but it seems to be a lot
15 matches
Mail list logo