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
__________________________
From 9e67ece3a26c850c12174bd40d9d66ad1927034c Mon Sep 17 00:00:00 2001
From: "Alan W. Irwin" <[email protected]>
Date: Wed, 3 Sep 2014 07:03:12 -0700
Subject: [PATCH] Update documentation of try_compile.

---
 Help/command/try_compile.rst |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 8ed3cf4..b2ae48b 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -36,9 +36,10 @@ cleaned automatically.  For debugging, --debug-trycompile can be
 passed to cmake to avoid this clean.  However, multiple sequential
 try_compile operations reuse this single output directory.  If you use
 --debug-trycompile, you can only debug one try_compile call at a time.
-The recommended procedure is to configure with cmake all the way
-through once, then delete the cache entry associated with the
-try_compile call of interest, and then re-run cmake again with
+The recommended procedure is to protect all try_compile calls in your
+build-system by "if(NOT DEFINED RESULT_VAR)" logic, configure with cmake
+all the way through once, then delete the cache entry associated with
+the try_compile call of interest, and then re-run cmake again with
 --debug-trycompile.
 
 Some extra flags that can be included are, INCLUDE_DIRECTORIES,
-- 
1.7.10.4

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to