[CMake] $ENV usage and documentation

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Jan 28 00:16:46 EST 2008


On 2008-01-27 22:28-0500 Brandon Van Every wrote:

> On Jan 27, 2008 8:34 PM, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
>> I would like to be able to read arbitrary environment variables from within
>> cmake.  The 2.4.8 documentation only refers to $ENV once as "$ENV{PATH}" in
>> an extremely narrow context (the TO_CMAKE_PATH signature of the FILE command).
>> However, when I tried, e.g.,
>>
>> SET(pc_path "$ENV{PKG_CONFIG_PATH}")
>>
>> it seemed to work.  Is this usage supported in general?
>
> As far as I know.  You can test all these things out with trivial
> scripts to prove that they work or don't work.

Yes, that is exactly what I have done, but the question remains is this some
side effect that might be removed later or is the code meant to work that
way, i.e., is it a supported use?

> It would be best if you file a (documentation, text) bug report for
> this.  Preferably with the wordsmithing you think should be used, and
> where it should be used, based on what you have determined works
> properly.  I've been doing this for various documentation
> embellishments in recent months, and they are getting acted upon and
> closed.

Well, it does sound like you have been successful with that approach so I
may adopt it, but generally I am quite hesitant to go through formal bug
reporting for stuff that can be fixed much faster than the time spent on bug
triage. IOW, I hope CMake developers read this list and when they see small
issues reported they fix it immediately rather than fooling around with bug
reports, assigning somebody to deal with it, etc.  Finally, there is no
point in me suggesting new documentation wording when questions like the
above are still outstanding.

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