# CMake generate error due to CMAKE\_DEFAULT\_BUILD\_TYPE

**URL:** <https://discourse.slicer.org/t/cmake-generate-error-due-to-cmake-default-build-type/14682>\
**Category:** Development\
**Created:** [November 19, 2020, 3:54am UTC](https://discourse.slicer.org/t/cmake-generate-error-due-to-cmake-default-build-type/14682 "2020-11-19T03:54:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [November 19, 2020, 3:54am UTC](https://discourse.slicer.org/t/cmake-generate-error-due-to-cmake-default-build-type/14682/1 "2020-11-19T03:54:34Z")

</div>

Hello everyone  
When I use cmake-gui to build 3dSlicer,I run into this problem.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/0/e0ea9c6a50a2ed9a674ec580daae29ae6c0acfd9.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 19, 2020, 4:11am UTC](https://discourse.slicer.org/t/cmake-generate-error-due-to-cmake-default-build-type/14682/2 "2020-11-19T04:11:46Z")

</div>

CMAKE\_DEFAULT\_BUILD\_TYPE must not be used with CMake \>=3.17 (see [https://github.com/Slicer/Slicer/pull/4799](https://github.com/Slicer/Slicer/pull/4799) for details).

Please use latest stable or master version of Slicer source code and follow the current build instructions: [https://slicer.readthedocs.io/en/latest/developer\_guide/build\_instructions/windows.html](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html)
