libarchive 3.1.2 (reduced)

Extract upstream libarchive using the following shell code.

url=git://github.com/libarchive/libarchive.git &&
v=3.1.2 &&
r=19f23e19 &&
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"
Add option to use stdout/stderr of original terminal in cmake --build

Pass the original file handles to the native tool when using the
--use-stderr option in the build command. This enables the
usage of advanced terminal features like colored output.
install: Remove error condition using INCLUDES DESTINATION without EXPORT.

Commit 650e61f8 (Add a convenient way to add the includes install
dir to the INTERFACE., 2013-01-05) introduced an error case for
using the install(TARGETS) command with specified INCLUDES DESTINATION,
but no specified EXPORT set.

It is convenient to use a variable to set the various destinations
for different outputs (as KDE does), and some targets such as
executables are installed but not exported. This was triggering
the error case, but as it is a common case, remove the error.
bash-completion: Add -S,-SP options arguments completion
bash-completion: Fix/improve generator names extraction
VS 6: Tell BuildDepends test to tolerate ninjadep failure

The VS 6 IDE does not want to recompile a particular source after
a particular header it includes is modified, even by hand.  For
now just silence the failure and document it with a comment.
cmMakefile: Do not track configured files known to be temporary

Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

Teach cmMakefile::ConfigureFile to skip tracking files with "CMakeTmp"
in their path, just like cmCoreTryCompile::TryCompileCode does to
avoid adding dependencies on temporary source files.  In the future
we will need a more general filter to avoid recording as CMake
outputs any files that do not exist at the end of generation.
CMake Nightly Date Stamp
Merge branch 'libarchive-upstream' into update-libarchive

Conflicts:
	Utilities/cmlibarchive/CMakeLists.txt
	Utilities/cmlibarchive/libarchive/archive.h
	Utilities/cmlibarchive/libarchive/archive_entry.h
	Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
	Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
	Utilities/cmlibarchive/libarchive/archive_windows.h
	Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c
libarchive: Update README-CMake.txt for new snapshot
libarchive: Include cm_zlib.h to get zlib used by CMake

Follow up change from commit ffa6faa4 (libarchive: Include cm_zlib.h to
get zlib used by CMake, 2011-12-20) for new includes of zlib.h in
updated libarchive.
libarchive: Silence API deprecation warnings

CMake uses old libarchive APIs for now.
libarchive: Avoid struct init with variable

Compilers such as Borland and MIPSpro do not like struct initialization
with variables.  Initialize using assignment instead.
libarchive: Remove build options not used by CMake

Drop options POSIX_REGEX_LIB and ENABLE_SAFESEH that we do not want for
the CMake build of libarchive.
libarchive: Backport to CMake 2.8.2

Avoid requiring CMake 2.8.6 for CMakePushCheckState or CMake 2.8.8 for
CMakeExpandImportedTargets.  Drop the custom versions of CMake modules
CheckCSource(Compiles|Runs) because we do not use the SAFESEH option
anyway.
Unify the way the flags of a static library are read

Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central
function for getting the linker flags for a given target.
Add support for CMAKE_STATIC_LINKER_FLAGS

Add the content of this variable to the target specific linker flags
as we do with the other CMAKE_*_LINKER_FLAGS variables already.
Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude

Add support for CMAKE_STATIC_LINKER_FLAGS_* to
CMakeCommonLanguageInclude.cmake to set the defaults similar
to the other CMAKE_*_LINKER_FLAGS_*.
Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables

Add CMAKE_MODULE_LINKER_FLAGS_*, CMAKE_SHARED_LINKER_FLAGS_* and
CMAKE_STATIC_LINKER_FLAGS_* to cmDocumentVariables.cxx with a
similar documentation as CMAKE_EXE_LINKER_FLAGS_*.
Add additonal tests for the linker flags

Extend Tests/LinkFlags to test libraries of the type MODULE and
the content of the CMAKE_*_LINKER_FLAGS_* variables.