mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Make sure that we also trigger variable watches when a variable is set in the parent scope. Fixes: #17827
16 lines
217 B
CMake
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()
|