[CMake] CMake questions

dizzy dizzy at roedu.net
Thu May 22 09:19:39 EDT 2008


On Thursday 22 May 2008 12:03:01 Oleg Puchinin wrote:
> Hello !
>
> I have two questions.
> 1. How to add source files to target ?

See the man page for "ADD_EXECUTABLE", basically when you add a target you 
have to specify the sources it's made of too.

> 2. How to build target with debug info ?

There are several solutions here. A not very portable aproach is to add 
whatever compiler flags you wish to the compile command used, using cmake's 
SET_TARGET_PROPERTIES and setting the COMPILE_FLAGS property (see the man 
page again, this time on SET_TARGET_PROPERTIES).

-- 
Mihai RUSU					Email: dizzy at roedu.net
			"Linux is obsolete" -- AST


More information about the CMake mailing list