Qt4Macros: Allow specifying a TARGET in invokations of macros.

That will allow things like this:

 find_package(Qt4)

 qt4_generate_moc(myfile.h moc_myfile.cpp TARGET foo) # Note, foo target doesn't
                                                      # exist until below.

 add_library(foo ...)

The qt4_generate_moc call would use the INCLUDE_DIRECTORIES from
the foo target using generator expressions. Currently it reads
the INCLUDE_DIRECTORIES directory property, meaning that include_directories()
is required.

Support for the TARGET is also added to qt4_wrap_cpp, but not qt4_automoc,
as that is deprecated in favor of the AUTOMOC target property.

The moc tool reports failure if the Q_INTERFACES macro is used with
an argument which has not appeared with Q_DECLARE_INTERFACE, so that is
the basis of the unit test.

The command line arguments are now always written to a file, which is
passed to moc as the @atfile. This was already the case on Windows, but
now it is used everywhere. The reason for that is that it is not currently
possible to expand the list of includes from a target directly in
a add_custom_command invokation (though that may become possible in the
future). There is not a big disadvantage to using the file anyway on
unix, so having one code path instead of two is also a motivation.
Clean up the VariableUsage source project.
Merge topic 'suppress-unused-cli-with-value-in-cache' into next

1f75ab9 Clean up the VariableUsage source project.
CLI: Suppress the unused warning if the key value pair is cached.

It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning
for using it despite it not being used.

The WarnUnusedCliUnused test relies on the warning being emitted
each time cmake is run on an existing build. That behavior is changed
by this patch to warn only on the first invokation of CMake, and not
on subsequent invokations (because the variable is in the cache with
the same value). For that test, a clean target is added which clears
the cache and cause the warning to be emitted each time.

As the Ninja generator does not support the feature needed to test
this, it is not tested with that generator.
Merge topic 'suppress-unused-cli-with-value-in-cache' into next

68a733c CLI: Suppress the unused warning if the key value pair is cached.
Merge topic 'qt4-macros-TARGET-arg' into next

9ce60ff Qt4Macros: Allow specifying a TARGET in invokations of macros.