# variables for cross-platform code?

**URL:** https://discourse.cmake.org/t/variables-for-cross-platform-code/10115
**Category:** Usage
**Created:** [February 16, 2024, 4:11pm UTC](https://discourse.cmake.org/t/variables-for-cross-platform-code/10115 "2024-02-16T16:11:11Z")
**Posts on this page:** 1
**Showing post:** 8

<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 18, 2024, 4:05am UTC](https://discourse.cmake.org/t/variables-for-cross-platform-code/10115/8 "2024-02-18T04:05:25Z")

</div>

> [@dabrahams](#):
>
> There’s no obvious direction that I should go look up the `ENVIRONMENT_MODIFICATION` test property (not everyone is reading the HTML docs).

Ah, the link is dropped from the `--help` docs 😕 . Can you file an issue to improve wording to at least encourage looking there?

> [@dabrahams](#):
>
> So would that get me out of having to use an escaped semicolon in [this](https://gitlab.kitware.com/cmake/cmake/-/issues/25686) example?

Yes, semicolon quoting test properties through a generic API was the straw that finally made me say “bah, I just need to implement this in `cmake -E env`”. 🙂 .

Note that:

```auto
cmake -E env --modify \
  PATH=path_list_prepend:path1 \
  PATH=path_list_prepend:path2

```

works as you expect (`path2:path1:$PATH`) so that you can build these up piecemeal instead of having to collate them ahead of time (sorting may be required though).

---

_[View the full topic](https://discourse.cmake.org/t/variables-for-cross-platform-code/10115)._
