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>
3 files changed