[Qt-creator] Some thoughts about 2.5

Campbell Barton ideasman42 at gmail.com
Tue May 29 00:10:50 CEST 2012


On Mon, May 28, 2012 at 10:32 AM, Diego Iastrubni <diegoiast at gmail.com> wrote:
>
> On Sun, May 27, 2012 at 5:04 PM, Geronimo Ma. Hernandez
> <geronimo013 at gmx.com> wrote:
>>
>> I'm sorry, but I continued with my project and currently I can't build it
>> with
>> QtCreator.
>> That's probably my fault, cause I don't know cmake configuration ...
>> ... but I don't really want to spent time bothering with different make
>> systems.
>
>
> Try this in your CMakeLists.txt:
>
> #
> http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_change_the_default_build_mode_and_see_it_reflected_in_the_GUI.3F
>
>
> IF(NOT CMAKE_BUILD_TYPE)
>   SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
>       "Choose the type of build, options are: None Debug Release
> RelWithDebInfo MinSizeRel."
>
>
>       FORCE)
>
>
>
> ENDIF(NOT CMAKE_BUILD_TYPE)
>
> (ugly but works). This enabled debug by default - and you will be able to
> step into your code

better use this:

# avoid having empty buildtype
set(CMAKE_BUILD_TYPE_INIT "RelWithDebInfo")



More information about the Qt-creator mailing list