[CMake] debug- and release options

Filipe Sousa filipe at ipb.pt
Mon Feb 6 16:44:19 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Neundorf wrote:
> Hi, 
>  
> I just played a bit around with debug and release options in cmake. 
> Am I right that: 
> CMAKE_CXX_FLAGS is used always 

That's true for c++

> CMAKE_CXX_FLAGS_DEBUG and CMAKE_CXX_FLAGS are used for buildtype==debug 
> CMAKE_CXX_FLAGS_RELEASE and CMAKE_CXX_FLAGS are used for 
> buildtype==release 

Yes

And if build type is foo CMAKE_CXX_FLAGS and CMAKE_CXX_FLAGS_FOO are
used for buildtype==foo

> And that  
> target_link_libraries(testapp libx optimized liby debug libz ) 
>  
> libx is linked in all cases 
> liby is linked if buildtype is not set and if buildtype==release 
> libz is only linked if buildtype==debug ? 

Yes. The default build type is Release IIRC

>  
> Is it possible to have e.g. a "_debug" appended to the names of all 
> created libraries when doing a debug build ? 

Maybe, never tryed

> Bye 
> Alex 
>  
> 


- --
Filipe Sousa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD58MzbQdNYqwwwCwRAgy0AKCiTKMbDjgm5PYokBzM8DNr7gqTfgCeJsfX
fMFffkLPaFhChrbcpvxRQII=
=e5oM
-----END PGP SIGNATURE-----


More information about the CMake mailing list