[cmake-developers] --debug-trycompile not working as documented with the results being overwritten

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Sep 3 10:52:35 EDT 2014


On 2014-09-03 09:38-0400 Brad King wrote:

> On 09/02/2014 03:52 PM, Alan W. Irwin wrote:
>> just go ahead an fix this documentation bug without
>> going through the normal dance of putting it on the bug tracker,
>
> Please construct a proposed patch with "git format-patch" and
> attach it in a message here.

DONE. See attached 0001-Update-documentation-of-try_compile.patch

The rst format seems obvious so I was pretty sure I understood
what changes I had to make in the above patch, but just to be sure I
checked this patch by building the patched master version and after
that, cmake --help-command try_compile gave the desired corrected
results.

One caveat.

My experimental result was try_compile always repeats so must not have
any internal "if(NOT DEFINED RESULT_VAR)" logic.  Which is why I
updated the try_compile documentation accordingly.  However, someone
with more C++ skills than I have should probably double-check the
try_compile code to make sure that experimental conclusion is correct.

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-documentation-of-try_compile.patch
Type: text/x-diff
Size: 1393 bytes
Desc: try_compile documentation patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140903/c5497c5f/attachment-0002.patch>


More information about the cmake-developers mailing list