# Source\_group does not support generator expression

**URL:** https://discourse.cmake.org/t/source-group-does-not-support-generator-expression/2543
**Category:** Development
**Created:** [January 14, 2021, 10:14am UTC](https://discourse.cmake.org/t/source-group-does-not-support-generator-expression/2543 "2021-01-14T10:14:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fluffymons](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/6f9a4e/32.png) [@fluffymons](https://discourse.cmake.org/u/fluffymons)
#### Post date: [January 14, 2021, 10:14am UTC](https://discourse.cmake.org/t/source-group-does-not-support-generator-expression/2543/1 "2021-01-14T10:14:09Z")

</div>

I’m trying to set up a tree in visual studio using source\_group. But i have some files that are exclusive to the windows build that are excluded through generator expression. However, when passing sourcefiles to gource\_group, source\_group fails to parse the generator expression during configuration. Is there a workaround for this? and if not, shouldn’t this be a feature of cmake?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [January 14, 2021, 1:35pm UTC](https://discourse.cmake.org/t/source-group-does-not-support-generator-expression/2543/2 "2021-01-14T13:35:20Z")

</div>

[This issue](https://gitlab.kitware.com/cmake/cmake/-/issues/19813) seems to be the one you’re looking for.
