CTest: Simplify environment save/restore

Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment.  Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere.  Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
CMake Nightly Date Stamp
try_compile: Cleanup temporary directories (#13160)

Since commit 4fbdce2b (try_compile: Use random executable file name,
2012-02-13) a different <target>.dir is used for each try-compile.
Cleanup the directories as well as their content to avoid accumulating
leftover temporary directories.
Fix warning about char* instead of const char*.
Merge topic 'mumps_coverage' into next

dd07161 Fix warning about char* instead of const char*.
Fix line length.
Merge topic 'mumps_coverage' into next

72210c2 Fix line length.
Merge topic 'try-compile-cleanup-dirs' into next

953257c try_compile: Cleanup temporary directories (#13160)
a7d0fb1 CMake Nightly Date Stamp
KWSys: Fix SystemTools environment memory handling (#13156)

The SystemTools::PutEnv function tries to provide the "putenv" API
without leaking memory.  However, the kwsysDeletingCharVector singleton
frees memory that may still be referenced by the environment table,
having been placed there by putenv.  If any static destruction or
processing by an external tool happens after the singleton is destroyed
and accesses the environment it will read invalid memory.

Replace use of putenv with setenv/unsetenv when available.  The latter
manage internal copies of the values passed instead of referencing the
original memory.  When setenv/unsetenv are not available use putenv with
a singleton that removes its values from the environment before freeing
their memory.  This requires an "unputenv" implementation.  On at least
some platforms it must be written in terms of "putenv" because other
APIs are not available and direct modification of the "environ" global
is not safe (e.g. on Windows there is interaction with "wenviron").
Fortunately either putenv("A=") or putenv("A") will remove "A" from the
environment on these platforms.  On other platforms fall back to direct
manipulation of "environ".

Also add UnPutEnv to the API and add a test for the behavior of both.
Merge topic 'kwsys-environ-cleanup' into next

b67d052 KWSys: Fix SystemTools environment memory handling (#13156)
b10c5cb CTest: Simplify environment save/restore
setup-stage: Optionally reconfigure topic stage

When the topic stage has already been configured present the current
configuration and prompt for optional reconfiguration.  While at it,
make the topic stage remote name configurable by the project.
Merge branch 'setup' into developer-setup
Merge topic 'developer-setup' into next

c9072f8 Merge branch 'setup' into developer-setup
b7daff9 setup-stage: Optionally reconfigure topic stage
CTest: Escape MemCheck test output for XML (#13124)

Any output that goes through CleanTestOutput must be printed through
cmXMLSafe.
Merge topic 'ctest_memcheck-xml-encoding' into next

3da577d CTest: Escape MemCheck test output for XML (#13124)
Documentation: Fix HTML anchor ranges

Generate anchors of the form

  <a name="..."></a>

instead of

  <a name="..."/>

to ensure browsers know that the anchor contains no text and do not try
to guess an end of the range.  Also make the "section_Index" and item
label anchors empty instead of containing the section header or label
text.  This ensures that the text associated with target anchors is not
rendered as if it were a hyperlink.
Merge topic 'doc-html-anchors' into next

dfccdd6 Documentation: Fix HTML anchor ranges
Require CMake 2.8.2 or higher to build CMake

Update the requirement specified in the top-level CMakeLists.txt file.
Drop the special-case minimum required version of 2.8.0 because the new
minimum subsumes it.

Revert commit 6c611c6b (libarchive: Restore CMake 2.6.3 as minimum
version, 2012-01-05) since our requirement now subsumes libarchive's.
Merge topic 'require-CMake-2.8.2' into next

d960de2 Require CMake 2.8.2 or higher to build CMake
Check{C,CXX}CompilerFlag: catch more Intel warnings (#12576)

Szilárd Páll pointed out that Intel compilers may output both "option...not
supported" and "options...not supported". Modify this regex to catch both
cases.