[CMake] Why SET() not support regular expression ?

Yang, Y. Y.Yang at tue.nl
Mon Jan 21 05:23:58 EST 2008


Hi, Alan

Thanks for your suggestion.But when using GLOB, the cmake would not update automatically.
So now, I think that the best way is added those files by myself.

Best regards

Yang


 > If you do a FILE(GLOB cmake will not detect when files are added to the directory and will *not* re-run automatically. If you explicitly list your files in CMakeLists.txt, then when it changes, cmake re-runs automatically as part of a build.

> Don't use the FILE(GLOB technique unless you are willing to live with this fact...

> HTH,
> David



-----Original Message-----
From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] 
Sent: 2008年1月18日 19:29
To: Yang, Y.
Cc: cmake at cmake.org
Subject: Re: [CMake] Why SET() not support regular expression ?

On 2008-01-18 13:43+0100 Yang, Y. wrote:

> Hi all.
>
> I just use CMake for two week. And I found it's very good tool.
> However, I just wonder that why in CMake the SET not support regular 
> expression.
>
> For example, SET( MY_SRCS mydir/*.c)
>
> if CMake can do this, I don't have to modify the CMakeLists.txt every 
> time when I add new files to mydir.

Search for the FILE(GLOB signature in the CMake documentation.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list