Hi there,<div><br></div><div>I have a problem recently in a project I'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 "${<meta http-equiv="content-type" content="text/html; charset=utf-8">ENABLED_ENGINES}${enginestring}\n")</div>
<div> elseif(NOT ${engine})</div><div> set(NOT<meta http-equiv="content-type" content="text/html; charset=utf-8">ENABLED_ENGINES "${<meta http-equiv="content-type" content="text/html; charset=utf-8">NOTENABLED_ENGINES}${enginestring}\n")</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 "Build the AGI Engine")</div><div>engine_list(SCUMMVM_ENGINE_AGI "Build the AGI Engine")</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 "Enabled:"\n\n)</div><div>message(STATUS "${ENABLED_ENGINES}\n")</div><div>message(STATUS "Not Enabled:"\n\n)</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>message(STATUS "${NOTENABLED_ENGINES}\n")</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've tried everything I could think of but I find myself lost. Could anyone point me to the flaw I'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">