CMake/Tests/RunCMake/variable_watch/RaiseInParentScope.cmake
Matteo Settenvini 65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE
Make sure that we also trigger variable watches when a variable
is set in the parent scope.

Fixes: #17827
2018-04-11 15:02:07 -04:00

16 lines
217 B
CMake

function(watch variable access value)
message("${variable} ${access} ${value}")
endfunction ()
# --------------
variable_watch(var watch)
set(var "a")
function(f)
set(var "b" PARENT_SCOPE)
endfunction(f)
f()