test: add test for PARENT_SCOPE behavior

Test code courtesy of Alex Merry <alex.merry@kde.org>.
cmDefinitions: only pull variables if they aren't local

Prior to the commit which changed behavior here, PARENT_SCOPE triggered
a ->GetInternal() call which would internally pull down the parent's
value into the local scope. When converted over to an explicit ->Pull()
call, the logic in ->GetInternal() which ignored the parent if it is
already in scope was missed and instead unconditionally pulled down.

Reported-By: Ben Cooksley <bcooksley@kde.org>
Merge topic 'variable-pull-failure' into next

91112028 cmDefinitions: only pull variables if they aren't local
d770c2f5 test: add test for PARENT_SCOPE behavior
cmDefinitions: only pull variables if they aren't local

Prior to the commit which changed behavior here, PARENT_SCOPE triggered
a ->GetInternal() call which would internally pull down the parent's
value into the local scope. When converted over to an explicit ->Pull()
call, the logic in ->GetInternal() which ignored the parent if it is
already in scope was missed and instead unconditionally pulled down.

Reported-By: Ben Cooksley <bcooksley@kde.org>
Revert "cmDefinitions: Don't store parent lookups"

This reverts commit 5abfde6cb8a1ae0b2825797eab6c2e9842eb7c49.

The behaviors associated with implicit pulldown on variable lookup
seriously conflict with the optimizations made in these commits.
Basically, since values were copied upon variable lookup, not just on
PARENT_SCOPE, coupled with PARENT_SCOPE's behavior based on whether the
variable is in the current scope or not causes serious problems with not
storing a value for every variable at every scope.

Reported-By: Ben Cooksley <bcooksley@kde.org>
test: add test for PARENT_SCOPE behavior

Test code courtesy of Alex Merry <alex.merry@kde.org>.
test: add a test for PARENT_SCOPE with multiple scopes

See the comment in the test for what is being tested here.
Merge branch 'parent-scope-tests' into variable-pull-failure

* parent-scope-tests:
  test: add a test for PARENT_SCOPE with multiple scopes
  test: add test for PARENT_SCOPE behavior

Conflicts:
	Tests/RunCMake/set/RunCMakeTest.cmake
revert branch

This branch is being remade in two parts: the tests and the revert to
better facilitate testing and verification.
Merge topic 'variable-pull-failure' into next

d7f72d1f revert branch
Merge topic 'revert-definition-map-lookup' into next

4d6715e4 Merge branch 'parent-scope-tests' into variable-pull-failure
e0c0b1ac test: add a test for PARENT_SCOPE with multiple scopes
064c415d test: add test for PARENT_SCOPE behavior
679cb986 Revert "cmDefinitions: Don't store parent lookups"
61032bea cmDefinitions: only pull variables if they aren't local
Revert "cmDefinitions: Don't store parent lookups"

This reverts commit 5abfde6cb8a1ae0b2825797eab6c2e9842eb7c49.

The behaviors associated with implicit pulldown on variable lookup
seriously conflict with the optimizations made in these commits.
Basically, since values were copied upon variable lookup, not just on
PARENT_SCOPE, coupled with PARENT_SCOPE's behavior based on whether the
variable is in the current scope or not causes serious problems with not
storing a value for every variable at every scope.

The commit changed behavior of the following example, among other cases:

  function(test_set)
    set(blah "value2")
    message("before PARENT_SCOPE blah=${blah}")
    set(blah ${blah} PARENT_SCOPE)
    message("after PARENT_SCOPE blah=${blah}")
  endfunction()
  set(blah value1)
  test_set()
  message("in parent scope, blah=${blah}")

Reported-by: Alex Merry <alex.merry@kde.org>
Reported-by: Ben Cooksley <bcooksley@kde.org>
Merge branch 'parent-scope-tests' into variable-pull-failure

* parent-scope-tests:
  test: add a test for PARENT_SCOPE with multiple scopes
  test: add test for PARENT_SCOPE behavior

Conflicts:
	Tests/RunCMake/set/RunCMakeTest.cmake
Merge topic 'revert-definition-map-lookup' into next

d1b62185 Merge branch 'parent-scope-tests' into variable-pull-failure
5f414cef Revert "cmDefinitions: Don't store parent lookups"
QtAutogen: Regenerate qrc files if their input changes (#15074)

Get dependencies from the output of ``rcc --list`` if using
Qt 5.  Otherwise process the file in the same way as the
qt4_add_resources macro.

This does not work for RCC files which are generated.

The cmake_autogen build step is implemented as a PRE_BUILD step
of the target currently if possible, rather than a standalone
custom target.  This is to keep the number of (synthesized)
custom targets that appear in the UI low, but in some cases
it is necessary to fall back to a full custom target.

Fall back to a full custom target for the VS builds if autorcc
is used.
Merge topic 'autorcc-depends' into next

6e1c359f QtAutogen: Regenerate qrc files if their input changes (#15074)