# Documentation of the set() command

**URL:** https://discourse.cmake.org/t/documentation-of-the-set-command/10416
**Category:** Usage
**Created:** [March 19, 2024, 4:05pm UTC](https://discourse.cmake.org/t/documentation-of-the-set-command/10416 "2024-03-19T16:05:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Oodini](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/db5fbb/32.png) [@Oodini](https://discourse.cmake.org/u/Oodini)
#### Post date: [March 19, 2024, 4:05pm UTC](https://discourse.cmake.org/t/documentation-of-the-set-command/10416/1 "2024-03-19T16:05:17Z")

</div>

Hello,

In the `set()` command help :

> If at least one `<value>...` is given, set the variable to that value.  
> Which one, among the n values ?

This line should mention that the values are set as an array.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [March 19, 2024, 9:37pm UTC](https://discourse.cmake.org/t/documentation-of-the-set-command/10416/2 "2024-03-19T21:37:49Z")

</div>

Not really. There is no such thing as an array in CMake. All values are just strings. In various places throughout CMake, the string value may be interpreted as a list of semicolon-separated values, but the variable is still just a string.

Reading the part of the docs you mention though, I can see the wording could be improved.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [March 19, 2024, 9:40pm UTC](https://discourse.cmake.org/t/documentation-of-the-set-command/10416/3 "2024-03-19T21:40:06Z")

</div>

The following sentences near the top of the page are easy to miss, but they explain the area you’re querying:

> Signatures of this command that specify a `<value>...` placeholder expect zero or more arguments. Multiple arguments will be joined as a [semicolon-separated list](https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#cmake-language-lists) to form the actual variable value to be set.

---

<div class="post-metadata">

### Author: ![Oodini](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/db5fbb/32.png) [@Oodini](https://discourse.cmake.org/u/Oodini)
#### Post date: [March 20, 2024, 8:11am UTC](https://discourse.cmake.org/t/documentation-of-the-set-command/10416/4 "2024-03-20T08:11:15Z")

</div>

Easy to miss, but also easy to get (to be honest, I opened your book PDF to get the info…) ! I plead guilty.  
But yes, it does explain fully what I was asking.

> Reading the part of the docs you mention though, I can see the wording could be improved.

Yes, I think the info could be repeated.
