<div dir="ltr"><div><div>Hi Miro,<br><br></div>looks like you want to use the try_run() command ( <a href="https://cmake.org/cmake/help/latest/command/try_run.html">https://cmake.org/cmake/help/latest/command/try_run.html</a> ).<br><br></div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 June 2016 at 22:10, Ilias Miroslav <span dir="ltr"><<a href="mailto:Miroslav.Ilias@umb.sk" target="_blank">Miroslav.Ilias@umb.sk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>Greetings, dear experts,</p>
<p><br>
</p>
<p>we have (two) short Fortran programs (detection of integer*4/8 for math libraries) which we would like to build and execute during project's  configuration phase.<br>
</p>
<p><br>
</p>
<p>There is the " CheckFortranSourceCompiles" command to compile a Fortran source code during project's  configure time.  However, we would be glad also to execute the resulting a.out binary and check if it passes or crashes.<br>
</p>
<p><br>
</p>
<p>Any help, please ? Is there a way to compile/execute short program in the configuration  stage of the (big) project ?</p>
<p><br>
</p>
<p>Yours, Miro</p>
<p>( CMake co-builder for <a href="http://www.diracprogram.org" target="_blank">http://www.diracprogram.org</a>  )<br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>

<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>