[CMake] Set default build type in CMakeLists.txt

David Doria daviddoria at gmail.com
Mon Jun 22 12:05:09 EDT 2009


You may also need to use FORCE:

>
> if(NOT CMAKE_BUILD_TYPE)
>   set(CMAKE_BUILD_TYPE "Release" CACHE STRING
>       "Choose the type of build, options are: Debug Release
> RelWithDebInfo MinSizeRel."
>       FORCE)
> endif(NOT CMAKE_BUILD_TYPE)
>
> James
> _______________________________________________
>

Great, that did it (it did require using FORCE). I don't understand why
<docstring> is required? Why can you not leave that string alone and simply
change the value of <variable>?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090622/b5254a9e/attachment.htm>


More information about the CMake mailing list