Просмотр исходного кода

Help: Clarify --debug-trycompile usage with try_compile

Explain that try_compile calls need to be protected with conditions to
avoid running more than once so that it is easy to isolate a single
try_compile to perform with --debug-trycompile.
Alan W. Irwin 11 лет назад
Родитель
Сommit
abbe91c58c
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      Help/command/try_compile.rst

+ 4 - 3
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
+project 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,