Optionally skip link dependencies on shared library files

Add target property LINK_DEPENDS_NO_SHARED and initialization variable
CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior.

Suggested-by: Leif Walsh <leif.walsh@gmail.com>
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.
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.
Correct string literal typo (have "(NULL)" like all other cases).

Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
Remove seemingly bogus duplicate CPACK_PACKAGE_FILE_NAME call.

Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
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.
ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
Merge topic 'link-depends-no-shared'

306796e Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED
ed97631 Optionally skip link dependencies on shared library files
Merge topic 'only-git-fetch-when-necessary'

a41d3a4 ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
de760c1 ExternalProject: Verify when a fetch occurs during update test.
0a34433 ExternalProject: Make sure the ExternalProjectUpdate setup is available.
9b66c8f ExternalProject: Always do a git fetch for a remote ref.
2619f4d ExternalProject: Add tests for UPDATE_COMMAND.
378aa12 ExternalProject: Do smoke tests for Git Tutorial builds.
d075829 ExternalProject: Only run 'git fetch' when required.
Merge topic 'CPack-fixTypoInErrorMsg'

572d9e1 Correct string literal typo (have "(NULL)" like all other cases).
Merge topic 'CPack-BugFixesSet'

b6f7881 Remove seemingly bogus duplicate CPACK_PACKAGE_FILE_NAME call.