ExternalProject: Only run 'git fetch' when required.

In the current default update step for Git under the ExternalProject_Add
command, a 'git fetch' is always performed, followed by a 'git checkout' and
'git submodule update --recursive'.  However, a 'git fetch' can be time
consuming and requires a network connection.

To save time, we look at the current checked out hash, and only perform the
fetch if required.  This is performed in a CMake script so we can handle
the conditional logic in a cross platform manner.
ExternalProject: Do smoke tests for Git Tutorial builds.
CMake Nightly Date Stamp
ExternalProject: Add tests for UPDATE_COMMAND.

Tests are added for UPDATE_COMMAND to ensure it is working properly.  Testing
infrastructure is added along with tests for Git, but tests for other version
control systems could easily be added in the future.
ExternalProject: Always do a git fetch for a remote ref.

Remote git refs always require a git fetch, because the remote may move around
where the ref points.
ExternalProject: Make sure the ExternalProjectUpdate setup is available.

This prepares the numberous tests that occur in the ExternalProjectUpdate
test.  The tests were passing previously because a fresh build was not performed.
ExternalProject: Verify when a fetch occurs during update test.

The performance feature of only performing a git fetch when needed
during the ExternalProject update step is verified during the test.
A fetch is identified by removing the FETCH_HEAD file and checking for
its reincarnation.
CMake Nightly Date Stamp
KWSys 2012-11-08 (3b17de34)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 3b17de34 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' df32fa6f..3b17de34
Brad King (1):
      3b17de34 SystemInformation: Do not dereference NULL ifa_addr

Change-Id: I2aecf9978d1f66ed021f47620d176a3837bc2ea3
Merge branch 'upstream-kwsys' into update-KWSys
Merge topic 'update-KWSys' into next

1acc689 Merge branch 'upstream-kwsys' into update-KWSys
4cf44d3 KWSys 2012-11-08 (3b17de34)
ce761e1 CMake Nightly Date Stamp
c31e119 CMake Nightly Date Stamp
Merge topic 'only-git-fetch-when-necessary' into next

a272326 ExternalProject: Verify when a fetch occurs during update test.
97131c0 ExternalProject: Make sure the ExternalProjectUpdate setup is available.
da155d0 ExternalProject: Always do a git fetch for a remote ref.
420db4f ExternalProject: Add tests for UPDATE_COMMAND.
378aa12 ExternalProject: Do smoke tests for Git Tutorial builds.
d075829 ExternalProject: Only run 'git fetch' when required.
Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED

Build a shared library and an executable linking to it inside the inner
test.  Set LINK_DEPENDS_NO_SHARED on the executable.  Add a custom
target to compare the output file times.  Verify that on the first build
the executable is newer than the library.  Then modify a library source
file.  Verify that on the second build the library is newer because the
executable did not have a dependency to re-link.
Merge topic 'link-depends-no-shared' into next

306796e Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED
Tests: Use WORKING_DIRECTORY test property instead of add_test keyword

...since the keyword is not processed properly by CMake 2.8.2, but
the test property is.
Merge topic 'only-git-fetch-when-necessary' into next

e3748dd Tests: Use WORKING_DIRECTORY test property instead of add_test keyword
ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
Merge topic 'only-git-fetch-when-necessary' into next

0fc55e2 ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
ExternalProjectUpdateTest: Remove argument to endif call
Merge topic 'only-git-fetch-when-necessary' into next

dd66217 ExternalProjectUpdateTest: Remove argument to endif call