# 'MT\_StaticRelease' doesn't match value 'MD\_DynamicRelease'

**URL:** https://discourse.cmake.org/t/mt-staticrelease-doesnt-match-value-md-dynamicrelease/5428
**Category:** Usage
**Tags:** os:windows
**Created:** [April 11, 2022, 7:35am UTC](https://discourse.cmake.org/t/mt-staticrelease-doesnt-match-value-md-dynamicrelease/5428 "2022-04-11T07:35:10Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Fab](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/51bf81/32.png) [@Fab](https://discourse.cmake.org/u/Fab)
#### Post date: [October 6, 2022, 1:19am UTC](https://discourse.cmake.org/t/mt-staticrelease-doesnt-match-value-md-dynamicrelease/5428/4 "2022-10-06T01:19:33Z")

</div>

Also note that for more recent cmake versions, the best resolution i found if you are using cmake is:

1. Use the CMP0091 policy setting to be able to use the MSVC option in point 2 like this 🙂

```auto
if(POLICY CMP0091)
  cmake_policy(SET CMP0091 NEW) 
endif()

```

1. Then only add the new property definition:

```auto
    set_property(TARGET MyVtkAppOrLibName PROPERTY
        MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

```

for each project it links to,

Note that once the CMP if section is inserted in step 1, we don’t need to set manually the /MP flag , the old cmake way (as it can cause other problems).

---

_[View the full topic](https://discourse.cmake.org/t/mt-staticrelease-doesnt-match-value-md-dynamicrelease/5428)._
