Hy,<br><br>I want to retrieve today date in order to install various release each day.<br>I&#39;ve created a script: GetDataTime.cmake<br><br>In which I have defined this macro:<br><br>INCLUDE(FindPerl)<br>MACRO (TODAY RESULT)
<br>IF (PERL_FOUND)<br>&nbsp;&nbsp;&nbsp; EXECUTE_PROCESS(COMMAND &quot;${PERL_EXECUTABLE}&quot; &quot;-E &#39;($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); printf \&quot;%02d%02d%02d\&quot;,$year-100,$mon+1,$mday;&#39;&quot; OUTPUT_VARIABLE ${RESULT})<br>
&nbsp;&nbsp;&nbsp; MESSAGE( STATUS &quot;(in) ${RESULT}&quot;)<br>ELSE (PERL_FOUND)<br>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MESSAGE(SEND_ERROR &quot;Perl needed to obtain today date&quot;)<br>ENDIF(PERL_FOUND)
<br>ENDMACRO (TODAY)<br><br>Then in the CMakeList.txt I have call<br>INCLUDE(GetTime)<br>TODAY(VAR)<br>MESSAGE( STATUS &quot;TODAY is ${VAR}&quot;)<br><br><br>When i call the makefile I have:<br>-- (in) VAR<br>-- Correctly setted <br>
<br><br>Someone can tell me how to use a macro to retrieve a result because I&#39;m not sure to understand!!!!<br><br clear="all"><br>--<br>Benoit RAT<br><a href="http://www.neub.co.nr">www.neub.co.nr</a><br>