# \<LANG\>\_COMPILER\_LAUNCHER does not use the passed list

**URL:** https://discourse.cmake.org/t/lang-compiler-launcher-does-not-use-the-passed-list/13140
**Category:** Usage
**Created:** [December 6, 2024, 5:21pm UTC](https://discourse.cmake.org/t/lang-compiler-launcher-does-not-use-the-passed-list/13140 "2024-12-06T17:21:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JBludau](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jbludau/32/5178_2.png) [@JBludau](https://discourse.cmake.org/u/JBludau)
#### Post date: [December 6, 2024, 5:21pm UTC](https://discourse.cmake.org/t/lang-compiler-launcher-does-not-use-the-passed-list/13140/1 "2024-12-06T17:21:05Z")

</div>

I would need a compiler launcher and arguments passed to it.  
[https://cmake.org/cmake/help/latest/prop\_tgt/LANG\_COMPILER\_LAUNCHER.html](https://cmake.org/cmake/help/latest/prop_tgt/LANG_COMPILER_LAUNCHER.html) states that you can pass a semicolon-separated list. Nevertheless if I do, I only get the first element in double quotes. The other arguments are dropped.  
Am I just miss-reading the documentation? Or using it wrong?

Minimal reproducer

```auto
cmake_minimum_required(VERSION 3.30)
project(Example CXX)

add_executable(example cmake_example.cpp)
set(launcher /path/to/my/launcher -bla)
set_target_properties(example PROPERTIES CXX_COMPILER_LAUNCHER ${launcher})

```

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [December 6, 2024, 5:25pm UTC](https://discourse.cmake.org/t/lang-compiler-launcher-does-not-use-the-passed-list/13140/2 "2024-12-06T17:25:54Z")

</div>

Don’t use `set_target_properties()` for properties which take more than one value; the command interprets its arguments as alternating `property` `value` `property` `value`… You’d need to quote the value, but I’d say it’s safer to just use `set_property()`:

```auto
set_property(TARGET example PROPERTY CXX_COMPILER_LAUNCHER ${launcher})

```

---

<div class="post-metadata">

### Author: ![JBludau](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jbludau/32/5178_2.png) [@JBludau](https://discourse.cmake.org/u/JBludau)
#### Post date: [December 6, 2024, 5:34pm UTC](https://discourse.cmake.org/t/lang-compiler-launcher-does-not-use-the-passed-list/13140/3 "2024-12-06T17:34:29Z")

</div>

Thanks. It was not clear to me that the property-value pair in [https://cmake.org/cmake/help/latest/command/set\_target\_properties.html](https://cmake.org/cmake/help/latest/command/set_target_properties.html) can not contain lists as value.

---

<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 20, 2026, 3:22am UTC](https://discourse.cmake.org/t/lang-compiler-launcher-does-not-use-the-passed-list/13140/4 "2026-02-20T03:22:24Z")

</div>

It’s a consequence of argument parsing. The command parses arguments as key/value, so if you have “key value value value” after argument splitting, your second value becomes another property. You can force a single argument with `key "${list_value}"`. But `set_property` is better anyways.
