[cmake-developers] Severe behavioural change regressions in release branch
Brad King
brad.king at kitware.com
Fri Oct 24 10:20:42 EDT 2014
On 10/24/2014 10:02 AM, Brad King wrote:
> I bisected it down to:
>
> commit 5abfde6cb8a1ae0b2825797eab6c2e9842eb7c49
> Author: Ben Boeckel <ben.boeckel at kitware.com>
> Date: Wed Mar 12 14:01:45 2014 -0400
>
> cmDefinitions: Don't store parent lookups
>
> When looking up scopes, it is faster to not store the lookup locally to
> keep the maps smaller and avoid extra allocations and rebalancing.
Here is a minimal standalone example:
$ cat regression.cmake
function(func var_name)
list(APPEND ${var_name} value)
set(${var_name} ${${var_name}} PARENT_SCOPE)
set(${var_name} ${${var_name}} PARENT_SCOPE)
endfunction()
func(var)
message(STATUS " var=[${var}]")
func(var)
message(STATUS " var=[${var}]")
$ cmake-3.0 -P regression.cmake
-- var=[value]
-- var=[value;value]
$ cmake-3.1 -P regression.cmake
-- var=[value]
-- var=[value]
-Brad
More information about the cmake-developers
mailing list