# Which env was changed with cmake --config command

**URL:** https://discourse.cmake.org/t/which-env-was-changed-with-cmake-config-command/7689
**Category:** Usage
**Tags:** os:windows
**Created:** [March 16, 2023, 4:29am UTC](https://discourse.cmake.org/t/which-env-was-changed-with-cmake-config-command/7689 "2023-03-16T04:29:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alfred-yu](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alfred-yu/32/3261_2.png) [@alfred-yu](https://discourse.cmake.org/u/alfred-yu)
#### Post date: [March 16, 2023, 4:29am UTC](https://discourse.cmake.org/t/which-env-was-changed-with-cmake-config-command/7689/1 "2023-03-16T04:29:08Z")

</div>

I used some opensource libraries in my own project with cmake, the build type is release by default with cmake --build . command, but the build type of opensource libraries becomes debug, it will be ok if I use cmake --build . --config Release command, so how can I keep same build type with opensource libraries? also which env is changed with --config parameter?  
thanks.

---

<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: [April 3, 2023, 11:12am UTC](https://discourse.cmake.org/t/which-env-was-changed-with-cmake-config-command/7689/2 "2023-04-03T11:12:44Z")

</div>

Projects can set their own default through `CMAKE_BUILD_TYPE`. It usually defaults to `Debug` or `""` if not touched (depending on generator).

> [@alfred-yu](#):
>
> also which env is changed with --config parameter?

I think it just sets `CMAKE_BUILD_TYPE` for single-config generators and tells the build tool which config to use for multi-config generators.
