<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 1:21 PM, Florian Lindner <span dir="ltr"><<a href="mailto:mailinglists@xgm.de" target="_blank">mailinglists@xgm.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 18.07.2017 um 10:59 schrieb Craig Scott:<br>
> You appear to be setting a GLOBAL property where you probably meant DIRECTORY. You could also consider setting the<br>
> target property instead rather than applying it to all targets (unless that's what you want).<br>
<br>
I tried to set the property on all targets, therefore I thought GLOBAL is the right thing.<br>
<br>
However,<br>
<br>
set_property(DIRECTORY "${CMAKE_SOURCE_DIR}/src" APPEND<br>
  PROPERTY COMPILE_DEFINITIONS "-DFOO")<br>
<br>
hasn't had any effect either.<br></blockquote><div><br></div><div>BTW, you don't include the -D when adding to COMPILE_DEFINITIONS, just put FOO, not -DFOO. Have a read of the <a href="https://cmake.org/cmake/help/latest/prop_dir/COMPILE_DEFINITIONS.html">docs</a>, they may give you other clues for this property (e.g. using the ..._CONFIG variant of it).</div><div><br></div><div> </div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div></div>