[Cmake] Set Libs and Compiler flags acc. to build options

Nils H. Busch nilsb at cns.mpg.de
Tue Nov 12 12:04:30 EST 2002


Hi,

how can I set compiler flags and/or select libraries depending on
certain build options?
I would like to set certain compiler options and link against certain
libs depending on whether I do a debug or optimised build. I found some
reference to debug /optimize strings for LINK_LIBRARIES and
SET_SOURCE_FILE_PROPERTIES, but I am not sure of the exact syntax given
the CMAKE pdf doc.

Are there more detailed overviews of all CMAKE commands ?

Plus, I have read that SOURCE_FILES is kind of deprecated, but could not
find out what should be used instead.

Many thanks,

--
    Nils H. Busch
    Max-Planck-Institute of Cognitive Neuroscience
    phone:  ++49 (341) 9940-035 fax:  ++49 (341) 9940-204
    e-mail: nilsb at cns.mpg.de






More information about the CMake mailing list