<br><br><div class="gmail_quote">On Thu, Jul 10, 2008 at 12:43 PM, Yuri Timenkov <<a href="mailto:ytimenkov@parallels.com">ytimenkov@parallels.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
<br>
On Monday 07 July 2008 19:59:24 Mehdi Rabah wrote:<br>
</div><div><div></div><div class="Wj3C7c">> Hi,<br>
><br>
> I need to set multiple symbols in one of my target of my project. I can't<br>
> use add_definitions because I don't want to define those variable for all<br>
> my targets, so I tried custom properties.<br>
><br>
> set_target_properties( target PROPERTIES DEFINE_SYMBOL VALUE1 VALUE2 )<br>
> doesn't work : the function doesn't expect this number of variables.<br>
><br>
> if I try :<br>
><br>
> set( var "VALUE1 VALUE2" ).<br>
> set_target_properties( target PROPERTIES DEFINE_SYMBOL ${var} )<br>
><br>
> I get<br>
><br>
> c1xx : fatal error C1083: 'VALUE2': No such file or directory<br>
><br>
> I'm working with the microsoft compiler, and cmake 2.6.<br>
</div></div>I just discovered nice feature: COMPILE_DEFINITIONS property.<br>
That is you can add custom defines to source files, targets or directories (with<br>
commands set_source_files_properties, set_target_properties and<br>
set_directory_properties commands accordingly).<br>
<br>
Moreover, COMPILE_DEFINITIONS can be configuration-specific, like<br>
COMPILE_DEFINITIONS_DEBUG.<br>
</blockquote><div><br>Thanks,<br><br>I also discovered (in the
doc) that cmake automatically define the targetName_EXPORTS when
compiling. I didn't tried it yet but it's exactly what I need.<br>
<br> </div></div>