Remove unused variable.
Add Target API to determine if an include is a system include.

The implementation can be modified later so that system includes
can be determined on a per-target basis.
Store system include directories in the cmTarget.

Entries from the cmMakefile are processed and maintained similarly
to other include directories. The include_directories(SYSTEM)
signature affects all following targets, and all prior targets
in the same makefile.
Extend the cmTargetPropCommandBase interface property handling.

This can be used to handle INTERFACE SYSTEM include directories
in particular.
Add a SYSTEM parameter to target_include_directories (#14180)

This is similar to the include_directories(SYSTEM) signature
in that it allows telling the compiler to ignore warnings from
such headers.
SelectLibraryConfigurations: Do not cache the _LIBRARY variable

SelectLibraryConfigurations module currently cache and mark as advanced
the variable ${basename}_LIBRARY.
${basename}_LIBRARY_RELEASE and ${basename}_LIBRARY_DEBUG are usually
cached, because they often come from find_library().
${basename}_LIBRARY on the other hand is always of type
"optimized;${${basename}_LIBRARY_RELEASE};debug;${${basename}_LIBRARY_DEBUG}"
or just "${basename}_LIBRARY_RELEASE" or "${basename}_LIBRARY_DEBUG" if
only one version of the library is not found, if both have the same
value, or if configuration types are not supported.

Caching and marking as advanced just ${basename}_LIBRARY_RELEASE and
${basename}_LIBRARY_DEBUG is enough, just by modifying these two
variables, the user has enough control on finding the library, and
having 3 variables is redundant and confusing.
Mark qt4_use_modules and qt4_automoc as obsolete.

The QT_QMAKE_EXECUTABLE has to be passed through the cmake calls because
the executable may not be in the PATH.
FindPNG: Add versioned library names for 1.6 (#14289)

While at it, refactor the versioned library name list generation to
reduce duplication.
ccmake: Add missing initializers reported by cppcheck

The return statement uses d1, d2, d3, and d4 variables but the code
which initialize them inside a if statement and not always this if
statement is corrent.  On the other hand these variables are using for
return statement and needed to be initialized.  A trivial fix to pervent
some compilers will give build error.

Reviewed-by: Igor Murzov <e-mail@date.by>
libarchive: Fix free() order to avoid accessing freed memory

The archive_string_conv type sc variable already freed via free(sc) on
the other hand in second line we are tyring to free its subset via
free(sc->from_charset) this will cause a problem because we couldn't
reach sc after first release.

Reviewed-by: Igor Murzov <e-mail@date.by>
cmcurl: Fix resource leak reported by cppcheck

Add missing fclose calls.

Reviewed-by: Igor Murzov <e-mail@date.by>
cmake: Fix resource leak reported by cppcheck

Return early in cmake::ReportUndefinedPropertyAccesses if there is no
global generator instead of opening a file and leaking the descriptor.

Reported-by: Ömer Fadıl USTA <omerusta@gmail.com>
VS,Xcode: Drop incorrect legacy dependency trace (#14291)

Drop the "vsProjectFile" argument from cmTarget::TraceDependencies.  It
appears to be the modern equivalent to a hunk added in commit ba68f771
(...added new custom command support, 2003-06-03):

 +  name = libName;
 +  name += ".dsp.cmake";
 +  srcFilesToProcess.push(name);

but was broken by refactoring at some point.  The current behavior tries
to trace dependencies on a source file named the same as a target, which
makes no sense.  Furthermore, in code of the form

 add_executable(foo foo.c)
 add_custom_command(OUTPUT "${somewhere}/foo" ... DEPENDS foo)

the "vsProjectFile" value "foo" matches source "${somewhere}/foo.rule"
generated to hold the custom command and causes the command to be added
to the "foo" target incorrectly.

Simply drop the incorrect source file trace and supporting logic.
OS X: Enable rpath support on Mac OS X when find_library() is used.
OS X: Add copyright notices to Darwin-*-Fortran.cmake
OS X: Add Fortran library version flags (#14249)

The linker flags for setting the compatibility and current versions of
libraries on Darwin are set for the supported Fortran compilers.

Set CMAKE_Fortran_CREATE_SHARED_LIBRARY for the NAG Fortran compiler to
have no space after <SONAME_FLAG> so the NAG compiler can parse the
argument correctly.
UseJava: Pass sources to javac using response file (#13028)

The command line string passed to javac can exceed the 8191-character
limit on Windows when there are a large number of files to compile.
To avoid this, the list of sources is written to a file which is then
passed to javac as an argfile.  Spaces in paths are dealt with by
enclosing each file in quotes, and separating files with a newline.
Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.

Unlike other target properties, this does not have a corresponding
non-INTERFACE variant.

This allows propagation of system attribute on include directories
from link dependents.
VS: Avoid leaking child process output back to IDE (#14266)

The VS IDE sets the environment variable VS_UNICODE_OUTPUT when
executing build rules in order to tell MS tools to report output through
a back door instead of through stdout/stderr.  Unset this variable so
that CMake can capture or properly redirect all output from processes it
runs even when running inside a VS IDE build environment.

This generalizes the special cases fixed by commit 80d045b0 (When
GetPrerequisites.cmake runs dumpbin while running inside the VS IDE...,
2008-05-01) and commit 44aff73d (ExternalProject: Avoid bleed-through
output when logging, 2011-01-06), so drop special handling of
VS_UNICODE_OUTPUT in those instances.
Merge topic 'tid-system-argument'

9cf3547 Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
1925cff Add a SYSTEM parameter to target_include_directories (#14180)
286f227 Extend the cmTargetPropCommandBase interface property handling.
83498d4 Store system include directories in the cmTarget.
f1fcbe3 Add Target API to determine if an include is a system include.
2679a34 Remove unused variable.