libarchive: Avoid left-shift overflow of signed integer

In libarchive/archive_write_set_format_zip.c there are two calls to
archive_le32enc whose second argument is of the form

 archive_entry_mode(zip->entry) << 16

However, the return type from archive_entry_mode may be a signed integer
so the shift may overflow.  Since the second argument of archive_le32enc
expects uint32_t anyway, simply cast to that prior to shifting.
VS: Use full path to sources to allow deeper trees with VS >= 10

As explained in cmVisualStudio10TargetGenerator::WriteSource comments,
VS tools append relative paths to the current directory, e.g.

 c:\path\to\current\dir\..\..\..\relative\path\to\source.c

and fail if this is over 250 charaters or so.  Previously we used a full
path only if no relative path could be constructed with a leading "../"
sequence that does not escape the source or build tree.  This means that
long relative paths can be generated when the build tree is inside the
source tree, and can cause build failures due to the above path
concatenation problem.

Teach cmVisualStudio10TargetGenerator::ConvertPath to ask the Convert
method to honor CMAKE_USE_RELATIVE_PATHS.  This will cause it to use
full paths by default but still give users the option of getting the
relative paths when possible.

Suggested-by: Josh Green <inbilla@gmail.com>
CodeLite generator: simplify code a bit
Utilities/Release: Update to openssl-1.0.1g

Update the prebuilt binary build configurations for machines where
we build our own OpenSSL library to use a newer version.
libarchive 3.1.2-246-ga5a5d28b (reduced)

Extract upstream libarchive using the following shell code.

url=git://github.com/libarchive/libarchive.git &&
v=3.1.2-246-ga5a5d28b &&
r=a5a5d28b &&
paths="
  CMakeLists.txt
  COPYING
  CTestConfig.cmake
  build/cmake
  build/pkgconfig
  build/utils
  build/version
  libarchive/*.*
" &&
mkdir libarchive-$v-g$r-reduced &&
git clone $url libarchive-git &&
date=$(cd libarchive-git && git log -n 1 --format='%cd' $r) &&
(cd libarchive-git && git archive --format=tar $r -- $paths) |
(cd libarchive-$v-g$r-reduced && tar xv) &&
fromdos libarchive-$v-g$r-reduced/build/cmake/Find*.cmake &&
echo "g$r date: $date"
libarchive: Disable all whitespace checks in third-party code
Merge branch 'libarchive-upstream' into update-libarchive

Resolve conflicts in Utilities/cmlibarchive/CMakeLists.txt as
appropriate.
libarchive: Update README-CMake.txt for new snapshot
libarchive: Drop LIBARCHIVE_ADDITIONAL_LIBS, CMake does not need it
libarchive: Use _snprintf on Windows, not snprintf
Drop /lib32 and /lib64 from link directories and RPATH (#14875)

Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths.  We
already have the equivalents under /usr.  Systems that have these
directories have their dynamic loaders configured already.  Do not allow
them to appear in the RPATH explicitly.
cmArchiveWrite: Handle NULL error string (#14882)

If archive_error_string returns NULL, use a placeholder string instead
of crashing.
Support duplicate object names in large archives (#14874)

Generalize the change from commit 39d0ade0 (Windows-GNU: Support
duplicate object names in large archives, 2014-04-14) to the default
archive rules.  These rules have used an incremental append approach
since commit v2.8.0~1856 (Build large archives incrementally,
2008-08-04).  Switch from "ar r" to "ar q" to be sure we always append
objects instead of replacing them.
FindGTest: Teach GTEST_ADD_TESTS about TYPED_TEST
CMP0052: Do not warn when include dir is not in source or build tree

When the policy was added by commit 783bce29 (Export: Disallow exported
interface includes in src/build tree, 2014-03-31) it accidentally left a
code path that would warn when the include dir is in the install tree
but *not* in the source or build tree.  Fix that.
CMP0052: Test that include dirs in install locations cause no warnings.
CMP0052: Make the warning message more informative.

Print the reason for the offending entry in the
INTERFACE_INCLUDE_DIRECTORIES.
Merge topic 'implicit-libNN-dirs'

cc57ff5c Drop /lib32 and /lib64 from link directories and RPATH (#14875)
Merge topic 'archive-null-error'

b508de59 cmArchiveWrite: Handle NULL error string (#14882)
Merge topic 'ar-no-replace'

1ec6485c Support duplicate object names in large archives (#14874)