[CMake] Overriding SET_TARGET_PROPERTIES from the command line

Filipe Sousa natros at gmail.com
Fri Mar 28 09:41:27 EDT 2008


Pau Garcia i Quiles wrote:
> Hello,
> 
>  From the command-line, cmake -DVARIABLE:TYPE=VALUE is equivalent to 
> SET( VARIABLE VALUE ).

-DVARIABLE:TYPE=VALUE is equivalent to set(VARIABLE VALUE CACHE TYPE 
...). The equivalent to SET( VARIABLE VALUE ) is -DVARIABLE=VALUE

> Is there any such equivalente for SET_TARGET_PROPERTIES? In a project I 
> have got a SET_TARGET_PROPERTIES( mytarget PROPERTIES DEBUG_POSTFIX "d") 
> which I would like to override when I'm packaging for Debian. I've tried 
> cmake -DDEBUG_POSTFIX:STRING="" but it does not work.
> 
> Thank you.

what about

IF(PACKING_FOR_DEBIAN)
   SET_TARGET_PROPERTIES( mytarget PROPERTIES DEBUG_POSTFIX "d")
ENDIF()

cmake -DPACKING_FOR_DEBIAN=1

PACKING_FOR_DEBIAN is just a suggestion, look at CPackDeb and see if you 
can find a variable that is already defined.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080328/2ca012f8/attachment-0003.pgp>


More information about the CMake mailing list