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

2008-01-23 Thread pepone . onrez
Maybe a macro can call cmake for only this part that need to be regenerated,
in this way if the macro detects thats a glob has changed it can recreate
rules that´s depends upon this GLOB, Only and idea what you think about
this?



 On Jan 23, 2008 6:59 AM, Daniel [EMAIL PROTECTED] wrote:

  pepone.onrez wrote:
   There isn't any way for GLOB runs every time and view if there is new
   files in the GLOB?
   or other way for adding multiple files with a regular expression and
  get
   it update when needed?
  
   a custom macro can do this?
  
   Any other ideas for adding multiple files and get it updated
  automatically.
  
   Thanks
  
 
  FILE does recalculate the GLOB every time CMake is run, but CMake is not
  invoked
  every time you type make.  CMake is ran once to setup the build
  directory, but
  after that when you run make it will call cmake only if a CMakeLists.txtis
  modified.
 
  So the only way to run the FILE command at each build would be to run
  cmake at
  every build.  This can be done, but it would be a waste time.
  --
  Daniel
 


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

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

2008-01-23 Thread Brandon Van Every
On Jan 23, 2008 3:51 PM, pepone. onrez [EMAIL PROTECTED] wrote:

 Maybe a macro can call cmake for only this part that need to be regenerated,
 in this way if the macro detects thats a glob has changed it can recreate
 rules that´s depends upon this GLOB, Only and idea what you think about
 this?

file(GLOB var pattern) simply outputs a variable var.  So you are
talking about determining arbitrary program execution based on the
value of the var.  In practice I don't see how you'd cleanly separate
that.


Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


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

2008-01-21 Thread Yang, Y.
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:[EMAIL PROTECTED] 
Sent: 2008年1月18日 19:29
To: Yang, Y.
Cc: cmake@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
__
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


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

2008-01-21 Thread pepone . onrez
There isn't any way for GLOB runs every time and view if there is new files
in the GLOB?
or other way for adding multiple files with a regular expression and get it
update when needed?

a custom macro can do this?

Any other ideas for adding multiple files and get it updated automatically.

Thanks


2008/1/21 Yang, Y. [EMAIL PROTECTED]:

 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:[EMAIL PROTECTED]
 Sent: 2008年1月18日 19:29
 To: Yang, Y.
 Cc: cmake@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
 __
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

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

2008-01-18 Thread Stuart Herring
On Jan 18, 2008 11:43 PM, Yang, Y. [EMAIL PROTECTED] wrote:

 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.

 That's not exactly a regular expression - it's a glob.
In any case, FILE(GLOB ...) is what you want. (as seen at
http://www.cmake.org/HTML/Documentation.html)
In this case FILE(GLOB MY_SRCS mydir/*.c)

Although, personally I prefer to explicitly add files, that way I know I
haven't inadvertently included something I didn't want.

Regards,
Stuart.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

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

2008-01-18 Thread Alan W. Irwin

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
__
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


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

2008-01-18 Thread David Cole
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


On 1/18/08, Stuart Herring [EMAIL PROTECTED] wrote:

 On Jan 18, 2008 11:43 PM, Yang, Y. [EMAIL PROTECTED] wrote:

  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.
 
  That's not exactly a regular expression - it's a glob.
 In any case, FILE(GLOB ...) is what you want. (as seen at
 http://www.cmake.org/HTML/Documentation.html)
 In this case FILE(GLOB MY_SRCS mydir/*.c)

 Although, personally I prefer to explicitly add files, that way I know I
 haven't inadvertently included something I didn't want.

 Regards,
 Stuart.

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake