cmake: Fix read-after-free while checking command-line arguments

Since commit v2.8.12~300^2~1 (CLI: Suppress the unused warning if the
key value pair is cached, 2013-05-16), cmake::SetCacheArgs saves a
cachedValue pointer and may cause the memory to be freed (by setting the
cache entry) before reading it again.  Fix this by saving the old value
in a separate string.
Merge branch 'backport-fix-read-after-free' into fix-read-after-free

Resolve conflicts in Source/cmake.cxx in our favor.
CMake Nightly Date Stamp
Features: Escape the COMPILE_OPTIONS for dialects.

Allow for future handling as a list, not a string which may contain
whitespace.
WCDH: Remove noise from generated defines.

The DECL part is redundant, and the language part is not needed. The
source language and context already determines the language, so there
is no need to repeat it in the define name.
Project: Detect other compilers before detecting Clang.

Commit v2.8.10.1~5^2 (Fix PathScale compiler id for Clang-based
upstream, 2012-11-05) re-ordered the detection logic for PathScale.

Other compiler vendors are also producing Clang-based frontends, so
detect "actual" Clang as one of the last compilers to allow for others
doing the same.

    http://llvm.org/devmtg/2014-04/PDFs/Posters/ClangIntel.pdf
    http://docwiki.embarcadero.com/RADStudio/XE5/en/Clang-based_C%2B%2B_Compilers
WCDH: Fix compiler id test for compatibility macros.

Enable the alignment features for Clang.
Merge topic 'features-cleanups' into next

631f0c6e WCDH: Fix compiler id test for compatibility macros.
52cc7306 Project: Detect other compilers before detecting Clang.
6699d2b0 WCDH: Remove noise from generated defines.
f8c6b43b Features: Escape the COMPILE_OPTIONS for dialects.
cmake,ccmake: Produce shorter output on no arguments (#14973)

Instead printing complete help cmake/ccmake now prints only Usage section and
extra information how to get more help or start your build.

Implementation Details:

  Usage help type was renamed to Help, and new Usage was introduces that prints
  only command line usage information without any extra details.

  Commands add some extra information when no arguments are passed.
Merge topic 'cmake-no-args-output' into next

de7c2882 cmake,ccmake: Produce shorter output on no arguments (#14973)
VS: Remove unused parameter of WriteTargetConfigurations

The cmGlobalVisualStudio7Generator::WriteTargetConfigurations
'root' parameter is no longer used, so remove it.
Ninja: Remove CMake includes from explicit depends (#14972)

It may happen that CMake include is an explicit dependency for some command,
while all CMake includes are set phony in WriteTargetRebuildManifest, this may
lead to duplicate phony generate rules which causes ninja warnings.

We need to remove implicit CMake includes in WriteUnknownExplicitDependencies.

This fixes FindCUDA ninja warnings.
Merge topic 'ninja-avoid-double-phony' into next

393babd7 Ninja: Remove CMake includes from explicit depends (#14972)
Merge topic 'vs-subdir-sln-depends' into next

cb67509b VS: Remove unused parameter of WriteTargetConfigurations
Fix access violation.
Merge topic 'features-cleanups' into next

8204897f Fix access violation.
Features: Escape the COMPILE_OPTIONS for dialects.

Allow for future handling as a list, not a string which may contain
whitespace.
WCDH: Remove noise from generated defines.

The DECL part is redundant, and the language part is not needed. The
source language and context already determines the language, so there
is no need to repeat it in the define name.
Project: Detect other compilers before detecting Clang.

Commit v2.8.10.1~5^2 (Fix PathScale compiler id for Clang-based
upstream, 2012-11-05) re-ordered the detection logic for PathScale.

Other compiler vendors are also producing Clang-based frontends, so
detect "actual" Clang as one of the last compilers to allow for others
doing the same.

    http://llvm.org/devmtg/2014-04/PDFs/Posters/ClangIntel.pdf
    http://docwiki.embarcadero.com/RADStudio/XE5/en/Clang-based_C%2B%2B_Compilers
WCDH: Fix compiler id test for compatibility macros.

Enable the alignment features for Clang.