[CMake] setting a list using the -D option
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Thu Sep 7 23:37:08 EDT 2006
On 2006-09-07 21:44-0400 Darby J Van Uitert wrote:
> Hello,
>
> How do I set the value of a list using the -D option when running cmake? For
> example, if I want FOO to be a list containing the letters a, b, and c, I
> thought I would do something like
>> cmake ../src -DFOO:STRING="a b c"
> I tried this but then it just treats it as a string and my foreach loop only
> runs once. Any input is appreciated.
-DFOO="a;b;c"
Delimiting list elements by semicolons within strings also works inside
cmake.
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 Yorick front-end to PLplot (yplot.sf.net); 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