# Add Property for a specific config

**URL:** https://discourse.cmake.org/t/add-property-for-a-specific-config/7549
**Category:** Usage
**Created:** [February 27, 2023, 9:05am UTC](https://discourse.cmake.org/t/add-property-for-a-specific-config/7549 "2023-02-27T09:05:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Julian\_LALU](https://discourse.cmake.org/user_avatar/discourse.cmake.org/julian_lalu/32/1762_2.png) [@Julian\_LALU](https://discourse.cmake.org/u/Julian_LALU)
#### Post date: [February 27, 2023, 9:05am UTC](https://discourse.cmake.org/t/add-property-for-a-specific-config/7549/1 "2023-02-27T09:05:51Z")

</div>

Hello,

I try to find a way to enable VS\_NO\_COMPILE\_BATCHING property only for a specific build type.  
I have `set_property(TARGET test_target PROPERTY VS_NO_COMPILE_BATCHING ON`  
And I try to do something like this :  
`set_property(TARGET test_target PROPERTY $<$<CONFIG:Coverage>:VS_NO_COMPILE_BATCHING ON> )`  
or  
`set_property(TARGET test_target PROPERTY $<$<CONFIG:Coverage>:VS_NO_COMPILE_BATCHING> $<$<CONFIG:Coverage>:ON> )`  
or  
`set_property(TARGET test_target PROPERTY "$<$<CONFIG:Coverage>:VS_NO_COMPILE_BATCHING ON>" )`  
or  
`set_property(TARGET test_target PROPERTY "$<$<CONFIG:Coverage>:VS_NO_COMPILE_BATCHING?ON>" )`

None of them activate the property.  
How can I disable MSVC compiler batching only for a specific config?

Thank you

---

<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 27, 2023, 2:35pm UTC](https://discourse.cmake.org/t/add-property-for-a-specific-config/7549/2 "2023-02-27T14:35:27Z")

</div>

Not all properties support generator expressions. However, even if they do, it is only the _value_ that supports them. You probably want something like this:

```cmake
set_property(TARGET blah
  PROPERTY
    VS_NO_COMPILE_BATCHING "$<IF:$<CONFIG:Coverage>:ON,OFF>")

```
