<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 2, 2017 at 3:03 AM, Bo Zhou <span dir="ltr"><<a href="mailto:bo.schwarzstein@gmail.com" target="_blank">bo.schwarzstein@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It depends on the Generator.<div><br></div><div>To the Makefile, the actual type was controlled by the compiler options. If you don't specific any type, usually it means non-debug and non-optimization because the CMAKE_CXX_FLAGS is empty as default. This is critical, so usually people should specific the actual type they want to build.</div><div><br></div><div>To the generator of the IDE, such as Visual Studio and Xcode, the CMAKE_BUILD_TYPE doesn't make sense but we have to use CMAKE_CONFIGURATION_TYPES, then CMake will create the several configuration sets for the IDE from the CMAKE_C|CXX_FLAGS_{CONFIG} .</div></div></blockquote><div><br></div><div>This thread inspired me to write up how we have been doing it in some of the projects I work on for quite a while now,</div><div><br></div><div><a href="https://blog.kitware.com/cmake-and-the-default-build-type/">https://blog.kitware.com/cmake-and-the-default-build-type/</a></div><div><br></div><div>It certainly isn't the only way, but it provides an easy path to ensure things show up in the GUIs, respect build types passed in, etc. </div></div></div></div>