On Mon, Jun 22, 2009 at 9:54 AM, Tyler Roscoe <[email protected]> wrote: > > On Mon, Jun 22, 2009 at 11:42:34AM -0400, David Doria wrote: > > I thought I could set the default build type with the following: > > > > SET(CMAKE_BUILD_TYPE debug) > > PROJECT(Test) > > ADD_EXECUTABLE(Test Test.cpp) > > > > However, when I run ccmake and then press 'c', the CMAKE_BUILD_TYPE field is > > still empty. Is it set and just not showing up? Or has it not been set > > properly? > > You need to use the form set(... CACHE ...) if you want that value to > appear in the cache. Look at the docs for set(). > > tyler > _______________________________________________
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 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
