project(): add optional VERSION argument

This patch adds support for an optional VERSION
argument to project().
With this patch, project() now also sets
PROJECT_VERSION_(MAJOR|MINOR|PATCH|TWEAK) and
<Name>_VERSION_(MAJOR|MINOR|PATCH|TWEAK) variables.
This makes it possible for other functions or macros
to rely on these variables containing the version number
of the current project.

Alex
ExternalProject: Reattempt download when verification fails.

When downloading an URL with ExternalProject, reattempt the download three
times if the file hash verification fails.

The re-attempt is limited to non-local URL's.  The same download CMake script
is re-used after removing any file that resulted from the previous download
attempt.  Up to three re-attempts are performed.
file DOWNLOAD: Add test for bad hash.
file DOWNLOAD: Test non-zero return status.
file DOWNLOAD: Display the curl result status when a hash mismatch occurs.
Ninja: Normalize paths of CMake re-run rule dependencies

Send all implicit dependencies through ConvertToNinjaPath.
Add CMakeCache.txt before uniquifying the list.
CMake Nightly Date Stamp
ctest_update: Handle P4 unknown revisions more robustly

Mark unknown revisions as such and fail instead of reporting revision 0.
Otherwise CTest reports massive file updates between revisions when the
server timeouts while trying to fetch the current revision number.
Merge topic 'ctest-update-p4-unknown-revision' into next

243cfc2f ctest_update: Handle P4 unknown revisions more robustly
Merge topic 'ninja-normalize-cmake-rerun-deps' into next

2c426bfb Ninja: Normalize paths of CMake re-run rule dependencies
CMakeDetermine*Compiler: Fix typo 'lile' => 'like'
Merge topic 'qcc-id' into next

dbc8987b CMakeDetermine*Compiler: Fix typo 'lile' => 'like'
CMakeDetermine*Compiler: Fix typo 'lile' => 'like'
QNX: Fix typo in CMP0047 implementation comment
Merge topic 'qcc-id' into next

de9c09c8 QNX: Fix typo in CMP0047 implementation comment
QNX: Introduce QCC compiler id for that QNX platform compiler.

Introduce policy CMP0047 to control resetting the id for
compatibility.

De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.

Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables.  They
are populated again later by the Compiler/GNU.cmake file anyway.

Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX.  Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.

Populate new module files to handle system includes and depfiles
when using the QCC compiler.

Remove code which unsets the system include and depfiles related
variables.  When a GNU driver is used instead of the QCC one, the
appropriate flags will be used.  These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.
Merge topic 'qcc-id' into next

e00db59d QNX: Introduce QCC compiler id for that QNX platform compiler.
d2dea79b CMakeDetermine*Compiler: Fix typo 'lile' => 'like'
Merge topic 'qcc-id'

e00db59d QNX: Introduce QCC compiler id for that QNX platform compiler.
d2dea79b CMakeDetermine*Compiler: Fix typo 'lile' => 'like'
Merge topic 'cmake-E-sleep'

94389f63 cmake: Add '-E sleep' command
Merge topic 'cmake-rerun-depends'

82d43175 Allow projects to specify extra inputs to CMake
1ef444d6 Add test case to verify CMake does not re-run on first build