<br><div class="gmail_quote">2012/1/24 Alexander Neundorf <span dir="ltr">&lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
On Tuesday 24 January 2012, Alfa Omega wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; What part does not follow the convention? I&#39;m using a toolchain file, plus<br>
&gt; when I was writing this I based it on a existing module bundled with CMake<br>
&gt; (but cant remember which).<br>
&gt;<br>
&gt; I&#39;m open to modifying my project to match the convention. If you could<br>
&gt; point out which parts don&#39;t quite meet the convention, I would greatly<br>
&gt; appreciate that.<br>
<br>
</div>The functions in ArduinoProcessing.cmake should have a common prefix to show<br>
where they come from, e.g. ARDUINO_<br></blockquote><div>ArduinoProcessing.cmake is a prototype, and isn&#39;t used with Arduino CMake, so you can ignore that.<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Same for the functions in FindArduino.cmake<br>
The documentation for the functions should be at the top of the file, so when<br>
cmake generates documentation, it will be included.<br></blockquote><div>The documentation for the module is located at the top (only those two function should be used), all other function are for internal use (but are documented). <br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
setup_arduino_compiler() looks wrong.<br></blockquote><div>What do you mean by it looks wrong (the name might not be the best :))?<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Did you consider adding Arduino as &quot;operating system&quot; ?<br>
Then you could add a<br>
Platforms/Arduino.cmake<br>
which is loaded automatically when CMAKE_SYSTEM_NAME is set to Arduino. <br></blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Ah, I just see, you did.<br>
Is there are reason why you didn&#39;t put all the functions, settings, etc. there<br>
?<br>
Then it wouldn&#39;t be necessary to use FindArduino.cmake when you already know<br>
you are building for Arduino.<br>
(e.g. there is no FindWindows.cmake, you simply are on Windows, or the cmake<br>
run fails).<br></blockquote><div>That is a good point, but then how could I specify that I want a specific minimal version? <br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

The toolchain file should be mostly done after the first three set() calls you<br>
have. More or less all of the rest should be in Arduino.cmake or Arduino-GNU-<br>
C/CXX.cmake.<br>
<br>
The functions for setting up additional targets look ok.<br>
<br>
What should find_sources() be used for ?<br></blockquote><div>It&#39;s used for getting all the sources located at specified path, because there is some processing of the sources (for Arduino library detection based on the header includes).<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
This looks out of place.<br>
<br>
Thanks<br>
Alex<br>
</blockquote></div><br><br clear="all"><br>-- <br><br>------=[QTZ]=------<br>QueezyTheGreat<br>