# Generator expressions: any reason there is no $\<PATH:NATIVE\_PATH\> ?

**URL:** https://discourse.cmake.org/t/generator-expressions-any-reason-there-is-no-path-native-path/7566
**Category:** Development
**Created:** [February 28, 2023, 8:52pm UTC](https://discourse.cmake.org/t/generator-expressions-any-reason-there-is-no-path-native-path/7566 "2023-02-28T20:52:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![neundorf](https://discourse.cmake.org/user_avatar/discourse.cmake.org/neundorf/32/2075_2.png) [@neundorf](https://discourse.cmake.org/u/neundorf)
#### Post date: [February 28, 2023, 8:52pm UTC](https://discourse.cmake.org/t/generator-expressions-any-reason-there-is-no-path-native-path/7566/1 "2023-02-28T20:52:18Z")

</div>

Hi,

there is a generator expression to convert a native path to cmake path, $PATH:CMAKE\_PATH.  
Is there a reason that there is no $PATH:NATIVE\_PATH ?  
What about versions which would do the conversion for lists of paths ?

Thanks  
Alex

---

<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: [February 28, 2023, 10:14pm UTC](https://discourse.cmake.org/t/generator-expressions-any-reason-there-is-no-path-native-path/7566/2 "2023-02-28T22:14:30Z")

</div>

Probably an oversight.

Path lists might fit well in the [`$<LIST>` proposal](https://gitlab.kitware.com/cmake/cmake/-/issues/24547) though.

@marc.chevrier

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [February 28, 2023, 11:07pm UTC](https://discourse.cmake.org/t/generator-expressions-any-reason-there-is-no-path-native-path/7566/3 "2023-02-28T23:07:28Z")

</div>

For conversion to native path, there is the `$<SHELL_PATH>` genex.

And, starting with the next version of `CMake` (3.27), `$<PATH>`, for decomposition and transformations subparts, supports the lists.

---

<div class="post-metadata">

### Author: ![hinell](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hinell/32/2657_2.png) [@hinell](https://discourse.cmake.org/u/hinell)
#### Post date: [March 7, 2023, 2:48pm UTC](https://discourse.cmake.org/t/generator-expressions-any-reason-there-is-no-path-native-path/7566/4 "2023-03-07T14:48:22Z")

</div>

Because it’s not cross-platform, that’s why.
