[Cmake] Looping over numbers

John Biddiscombe john.biddiscombe at mirada-solutions.com
Tue Feb 4 12:34:59 EST 2003


Andy,

>>>
How about a command RANGE with syntax:

RANGE(VARIABLE [START] END [INCREMENT])

Then you would say:

RANGE(var 1 20)
<<<

Good plan. How about

RANGE(var 1 20 "%02i")

Adding a printf type option for output, because it'd be nice to generate
01 02 03 04 as well as 1 2 3 4 to give better sorting on the dashboard.

RANGE(var 1 20 "File%02i") <-handy for file names too

I'll try and create one when I have a few hours free.

JB



More information about the CMake mailing list