<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Eric<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for pointing that out, the help docs I was looking at didn’t mention
</span><multi_value_keywords>, <span style="color:#1F497D">with that added it works as expected.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">JB</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Eric Clark [mailto:eclark@ara.com]
<br>
<b>Sent:</b> 19 October 2012 19:17<br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Cc:</b> CMake Mailing List (cmake@cmake.org)<br>
<b>Subject:</b> RE: help with cmake_parse_arguments<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D">John,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D">The cmake_parse_arguments command takes 5 arguments, not 4. My guess is that you just need to get the arguments right and things should then work for you assuming the rest
of your code is correct. If you look in CMakeParseArguments.cmake you should see the documentation for the command, but I can tell you that the command takes the following arguments:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Courier New";color:#1F497D">cmake_parse_arguments(prefix options singleValueArgs multiValueArgs ${ARGN})<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D">The prefix is what is added to the beginning of each variable that is set, the options is a list of parameters that do not have any arguments associated with them (i.e.
REQUIRED, NO_DEFAULT_PATH, etc.), the singleValueArgs is a list of all parameters that have only one argument associated with them, the mutliValueArgs is a list of all parameters that have one or more arguments associated with them, and the last parameter
should always be ${ARGN}.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D">Hope this helps…<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D">Eric<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a> [<a href="mailto:cmake-bounces@cmake.org">mailto:cmake-bounces@cmake.org</a>]
<b>On Behalf Of </b>Biddiscombe, John A.<br>
<b>Sent:</b> Friday, October 19, 2012 11:32 AM<br>
<b>To:</b> <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
<b>Subject:</b> [CMake] help with cmake_parse_arguments<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">I don’t understand why this stripped down test gives the wrong results. Can anyone point out what I’ve done wrong. I’m using cmake 2.8.9<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">Thanks<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">JB<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">=== TEST cmake ===<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">include (CMakeParseArguments)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">MACRO(ADD_TEXT_TEST)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> CMAKE_PARSE_ARGUMENTS(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> TEST ""<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> "NAME;COMMAND;ARGSLIST;BASELINE"
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> ${ARGN}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> )
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> message("TEST_DEFAULT_ARGS is ${TEST_DEFAULT_ARGS} from ${ARGN}")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> message("TEST_NAME is ${TEST_NAME}")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> message("TEST_COMMAND is ${TEST_COMMAND}")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> message("TEST_ARGSLIST is ${TEST_ARGSLIST}")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> message("TEST_BASELINE is ${TEST_BASELINE}")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">ENDMACRO(ADD_TEXT_TEST)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">set (datafile "Test1.xxx")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> ADD_TEXT_TEST(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> NAME
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> testiso_${datafile}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> COMMAND<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> "RunMe"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> ARGSLIST<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> 3.5555 nodal "${EAVL_SOURCE_DIR}/data/${datafile}"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> BASELINE<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> "${CMAKE_CURRENT_SOURCE_DIR}/baseline/testiso/${datafile}.out"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"> )<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">=== output ===<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">Gives output as follows – the name is missing and the arglist is truncated …<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas">TEST_DEFAULT_ARGS is from NAME;testiso_Test1.xxx;COMMAND;RunMe;ARGSLIST;3.5555;nodal;D:/Code/EAVL/data/Test1.xxx;BASELINE;D:/Code/EAVL/test/baseline/testiso/Test1.xxx.out<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas">TEST_NAME is
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas">TEST_COMMAND is RunMe<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas">TEST_ARGSLIST is 3.5555<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas">TEST_BASELINE is D:/Code/EAVL/test/baseline/testiso/Test1.xxx.out<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">--
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">John Biddiscombe, email:biddisco @.at.@ cscs.ch<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""><a href="http://www.cscs.ch/"><span style="color:windowtext">http://www.cscs.ch/</span></a><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Courier New"">Via Trevano 131, 6900 Lugano</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">, Switzerland | Fax: +41 (91) 610.82.82<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
</div>
</body>
</html>