# CodeBlocks vs CMAKE\_BUILD\_TYPE

**URL:** <https://discourse.cmake.org/t/codeblocks-vs-cmake-build-type/1931>\
**Category:** Code\
**Created:** [September 28, 2020, 5:30pm UTC](https://discourse.cmake.org/t/codeblocks-vs-cmake-build-type/1931 "2020-09-28T17:30:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ProTur1](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@ProTur1](https://discourse.cmake.org/u/ProTur1)\
**Post date:** [September 28, 2020, 5:30pm UTC](https://discourse.cmake.org/t/codeblocks-vs-cmake-build-type/1931/1 "2020-09-28T17:30:37Z")

</div>

It seems that CMAKE\_BUILD\_TYPE cannot be evaluated when using the CodeBlocks IDE ?

---

<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:** [September 28, 2020, 5:51pm UTC](https://discourse.cmake.org/t/codeblocks-vs-cmake-build-type/1931/2 "2020-09-28T17:51:06Z")

</div>

In what way? Does the variable not work for some reason? Do you have an example with expected and actual output?

---

<div class="post-metadata">

**Author:** ![ProTur1](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@ProTur1](https://discourse.cmake.org/u/ProTur1)\
**Post date:** [September 28, 2020, 5:59pm UTC](https://discourse.cmake.org/t/codeblocks-vs-cmake-build-type/1931/3 "2020-09-28T17:59:30Z")

</div>

It doesnt work. It evaluates to an empty string. CodeBlocks version is 20.03

---

<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:** [September 28, 2020, 8:31pm UTC](https://discourse.cmake.org/t/codeblocks-vs-cmake-build-type/1931/4 "2020-09-28T20:31:35Z")

</div>

The default value might be the empty string (it depends on the generator). Usually this ends up being treated as `Debug`, but I recommend adding logic to set the value if you’re in a single-config generator and it is an empty string.
