Re: [CMake] Default value for CMAKE_BUILD_TYPE

2012-05-14 Thread pellegrini
On 5/11/2012 5:30 PM, Jean-Christophe Fillion-Robin wrote: Hi Eric, In our different projects, we use an approach similar to this one: # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS Setting build type to 'Debug' as

Re: [CMake] Default value for CMAKE_BUILD_TYPE

2012-05-14 Thread Jean-Christophe Fillion-Robin
Hi Eric, Considering the fact Visual Studio is a multi-configuration system, I don't think using CMAKE_BUILD_TYPE is what you want. Indeed, in such case, the build type is know at build time only. See [1] Hth Jc [1] http://www.cmake.org/cmake/help/v2.8.8/cmake.html#variable:CMAKE_CFG_INTDIR

Re: [CMake] Default value for CMAKE_BUILD_TYPE

2012-05-11 Thread Jean-Christophe Fillion-Robin
Hi Eric, In our different projects, we use an approach similar to this one: # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS Setting build type to 'Debug' as none was specified.) set(CMAKE_BUILD_TYPE Debug CACHE STRING