[CMake] Debug/Release configurations for codeblocks ?

Alexander Neundorf a.neundorf-work at gmx.net
Sun Jul 25 12:58:46 EDT 2010


On Thursday 22 July 2010, Carlos wrote:
> Hello,
>
> It seems the debug/release default configuration are only built for VStudio
> suites.
> Anyway I am trying to simulated such for the codeblocks IDE, this is how I
> did my CMakeLists.txt :
>
> project( myapp )
>
> add_executable( Release WIN32 ${my_src_files} )
> target_link_libraries( Release  ${my_libs} )
> set_target_properties( Release PROPERTIES OUTPUT_NAME myappname )
>
> add_executable( Debug ${my_src_files} )
> target_link_libraries( Debug ${my_libs_dbg} )
> set_source_files_properties( Debug PROPERTIES COMPILE_DEFINITIONS .... etc
> .... )
> set_target_properties( Debug PROPERTIES OUTPUT_NAME myappname_dbg .... etc
> .... )
>
>
> Actually this works pretty fine but :
>
> Is that the right way to simulate VS build configurations ?

Hmm, the Codeblocks generator is makefile-based.
Each makefile-based buildtree builds only one configuration.
If you want multiple configurations, create one buildtree for each 
configuration (each with its own C::B project file).

> Is there any chance this conflicts with the VS generator ?
>
> Other misc question :
>
> What are the xxx/fast configurations in codeblocks ?

They are for building the respective target, but without checking whether the 
dependent targets are up-to-date (i.e. if you build A and A links against 
B, "A/fast" will only check what needs to be built for A, but not check all 
source files of B whether they have to be rebuild. This saves the time for 
checking the dependencies).

Alex


More information about the CMake mailing list