# Question about \`block\` command with PROPAGATE option

**URL:** https://discourse.cmake.org/t/question-about-block-command-with-propagate-option/6744
**Category:** Code
**Created:** [October 27, 2022, 7:12pm UTC](https://discourse.cmake.org/t/question-about-block-command-with-propagate-option/6744 "2022-10-27T19:12:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jbadwaik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jbadwaik/32/2871_2.png) [@jbadwaik](https://discourse.cmake.org/u/jbadwaik)
#### Post date: [October 27, 2022, 7:12pm UTC](https://discourse.cmake.org/t/question-about-block-command-with-propagate-option/6744/1 "2022-10-27T19:12:12Z")

</div>

Does `block(PROPAGATE)` feature work for cache entries? If not, is there a way to `set` cache variables in parent scope?

---

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [October 27, 2022, 10:14pm UTC](https://discourse.cmake.org/t/question-about-block-command-with-propagate-option/6744/2 "2022-10-27T22:14:27Z")

</div>

Cache variables have no scope, they are global.

---

<div class="post-metadata">

### Author: ![jbadwaik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jbadwaik/32/2871_2.png) [@jbadwaik](https://discourse.cmake.org/u/jbadwaik)
#### Post date: [October 28, 2022, 6:33am UTC](https://discourse.cmake.org/t/question-about-block-command-with-propagate-option/6744/3 "2022-10-28T06:33:08Z")

</div>

Thanks. I had no idea. May be there should be a line about this on this page: [https://cmake.org/cmake/help/latest/command/set.html](https://cmake.org/cmake/help/latest/command/set.html)
