Hi there,<div><br></div><div>I have a problem recently in a project I&#39;m trying to port to CMake. My installed CMake version is 2.8.4 from Debian testing. I require version 2.6.2 as a minimum and CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS is set to TRUE.</div>
<div><br></div><div>This is my macro:</div><div><div><br></div><div>MACRO(ENGINE_LIST engine enginestring)</div><div>    if(${engine})</div><div>        set(ENABLED_ENGINES &quot;${<meta http-equiv="content-type" content="text/html; charset=utf-8">ENABLED_ENGINES}${enginestring}\n&quot;)</div>
<div>    elseif(NOT ${engine})</div><div>        set(NOT<meta http-equiv="content-type" content="text/html; charset=utf-8">ENABLED_ENGINES &quot;${<meta http-equiv="content-type" content="text/html; charset=utf-8">NOTENABLED_ENGINES}${enginestring}\n&quot;)</div>
<div>    endif()</div><div>ENDMACRO(ENGINE_LIST)</div></div><div><br></div><div>This macro takes boolean parameter, selected or not in the configuraction menu, and a string. If it is true, the string is added to a list of enabled engines, if not, to a list of not enabled engines.</div>
<div><br></div><div>Example:</div><div><br></div><div>set(SCUMMVM_ENGINE_AGI FALSE CACHE BOOL &quot;Build the AGI Engine&quot;)</div><div>engine_list(SCUMMVM_ENGINE_AGI &quot;Build the AGI Engine&quot;)</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><br></div><div>message(STATUS &quot;Enabled:&quot;\n\n)</div><div>message(STATUS &quot;${ENABLED_ENGINES}\n&quot;)</div><div>message(STATUS &quot;Not Enabled:&quot;\n\n)</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>message(STATUS &quot;${NOTENABLED_ENGINES}\n&quot;)</div><div><br></div><div>The problem is that no matter if SCUMMVM_ENGINE_AGI is true or false, it is always caught in the ELSE clause. I&#39;ve tried everything I could think of but I find myself lost. Could anyone point me to the flaw I&#39;m unable to see?</div>
<div><br></div><div>Thank you,</div><div>Miguel</div><meta http-equiv="content-type" content="text/html; charset=utf-8">