Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in
generated link lines, 2014-07-30) we de-duplicate shared library targets
on the link line. However, some toolchains will fail linking if an
executable is linking to a shared library that is not used directly and
a static library that depends on the shared one. The linker may not
keep the reference to the shared library the first time and then the
symbols needed by the static library may not be found.
Fix this by reversing the direction of the for loop that removes the
duplicate shared libraries, in order to ensure that the last occurrence
of the library is left instead of the first one.
Extend Tests/Dependency with a case covering this behavior. Create an
executable that links to a shared library and a static library but only
needs the shared library as a dependency of the static library.
Co-Author: Brad King <brad.king@kitware.com>