<br><br><div class="gmail_quote">On 13 June 2011 02:53, Michael Hertling <span dir="ltr"><<a href="mailto:mhertling@online.de">mhertling@online.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
</div></div>AFAIK, there's no other approach to take account of single- and multi-<br>
config generators at the same time for this purpose, but perhaps, you<br>
could design the loop a bit smarter:<br>
<br>
FOREACH(i IN LISTS CMAKE_CONFIGURATION_TYPES ITEMS ${CMAKE_BUILD_TYPE})<br>
STRING(TOUPPER ${i} j)<br>
IF(NOT j MATCHES "RELEASENOOUTFILES")<br>
SET_PROPERTY(...)<br>
ENDIF()<br>
ENDFOREACH()<br></blockquote><div><br>I wasn't aware of that syntax of the foreach command - that does tidy it up a bit.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
and rely on the assumption that<br>
<br>
(1) the FLAGS are mentioned after the COMPILE_DEFINITIONS, and<br>
(2) the last -D/-U argument in the command line will take effect.<br>
<br>
At least, GCC guarantees that (2) holds, but I have not found any<br>
explicit assertion in the documentation that CMake guarantees (1),<br>
though it seems to work in this way.<br></blockquote><div><br>I'm not overly keen on that solution. <br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
BTW, is an "inverted" logic an option, i.e. a preprocessor definition<br>
NO_GEN_OUTFILES enabled for the RELEASENOOUTFILES configuration only?<br>
This would be much easier and fit that configuration's intent better.<br></blockquote><div><br>The default is to generate outfiles and the code is littered with blocks like this:<br><br>#ifdef GEN_OUTFILES<br>...<br>
#endif<br><br>Changing them to #ifndef NO_GEN_OUTFILES would work but the double negative makes the code less readable. I'll stick with what I already have for the moment, but add your modification to the foreach loop.<br>
<br>Thanks,<br><br>--<br>Glenn<br><br></div></div>