[CMake] add all files of a directory

Gerrick Bivins gbivins at objectreservoir.com
Mon Jul 14 08:07:10 EDT 2008


Hi Adrien,
I think you can use Cmake's GLOB to get do this, something like:
FILE (GLOB MYFILES RELATIVE Pybindings *.cxx )

MYFILES should be a variable with all the *.cxx files in Pybindings.
Gerrick 

On 7/14/08 5:23 AM, "Adrien Saladin" <adrien.saladin at gmail.com> wrote:

> Hi list,
> 
> I'm trying cmake as a replacement of our current build system.  A
> minimal CMakeLists.txt already works for the basic features of our
> C++/fortran library.
> 
> However, some C++ source files are generated from an external command.
> The names of the generated files cannot be easily guessed, but they
> are all located in the "Pybindings" subdirectory.
> Is there a way to add all the files in this directory  ?
> 
> Thanks
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list