[CMake] generalizing SET_TARGET_PROPERTIES & DEFINE_SYMBOL

William A. Hoffman billlist at nycap.rr.com
Tue Jan 17 21:32:18 EST 2006


At 03:38 PM 1/17/2006, Lloyd Hilaiel wrote:
>Hey all,
>
>(NOTE: assumptions made based on behavior of cmake version 2.2-patch 3)
>
>I understand the intention of this pair is to support the generation
>of static libs & shared libs on windows, but would generalizing it a
>bit hurt?
>
>My thoughts are:
>1) defining a symbol for a specific target should affect all built files
>   regardless of the type of target (in 2.2-3 it seems to be ignored for
>   static library targets)
>2) defining multiple symbols per target should be possible
>3) there should be a way to specify what the define should be set to
>   (other than "1")
>
>The main problem I'm having is:
>SET_TARGET_PROPERTIES(${TARGET} DEFINE_SYMBOL FOO)
>
>does not suggest to me the real behavior, which seems to be:
>"set FOO for compilation of files which will be rolled into ${TARGET}
> iff ${TARGET} is a shared library target".
>
>bad assumptions?  not enough information?  just plain dumb? :)

I agree it is a bad name.  It should have been called SHARED_DEFINE_SYMBOL_NAME
or something like that, because that is what it is.   For adding additional -D flags,
there is a COMPILE_FLAGS option that can be used.

-Bill



More information about the CMake mailing list