[CMake] Setting compile defs with: Cuda, add_subdirectory, and set_target_properties (COMPILE_DEFINITIONS)

Rolf Eike Beer eike at sf-mail.de
Thu Jul 15 01:24:03 EDT 2010


Am Wednesday 14 July 2010 schrieb Brian Davis:
> I have a macro which gets called to create cuda and matlab mex enabled
> libraries and apps.  I call this macro **twice from within a single
> directory** to create 2 libraries.  Problem is that I desire to set
> compiler defines -DWHATEVER=goop etc differently for each lib (for each of
> the two in question).  For instance -DCPU_RECON=yes for cpu library and
> -DGPU_RECON=yes for gpu library which rely on the same source code in the
> same directory:

>     SET_TARGET_PROPERTIES( ${MATLAB_CUDA_MEX_NAME} PROPERTIES
>       SUFFIX .mexw64
>        LINKER_LANGUAGE CXX
>        COMPILE_DEFINITIONS -DMY_DEFINE=DEFINE_THIS_GOOP
>       LINK_FLAGS /export:mexFunction
>       )

Shouldn't this be COMPILE_FLAGS?

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100715/c595d428/attachment.pgp>


More information about the CMake mailing list