Hi, On Tuesday 24 January 2012, Alfa Omega wrote: > Hi, > > What part does not follow the convention? I'm using a toolchain file, plus > when I was writing this I based it on a existing module bundled with CMake > (but cant remember which). > > I'm open to modifying my project to match the convention. If you could > point out which parts don't quite meet the convention, I would greatly > appreciate that.
The functions in ArduinoProcessing.cmake should have a common prefix to show where they come from, e.g. ARDUINO_ Same for the functions in FindArduino.cmake The documentation for the functions should be at the top of the file, so when cmake generates documentation, it will be included. setup_arduino_compiler() looks wrong. Did you consider adding Arduino as "operating system" ? Then you could add a Platforms/Arduino.cmake which is loaded automatically when CMAKE_SYSTEM_NAME is set to Arduino. Ah, I just see, you did. Is there are reason why you didn't put all the functions, settings, etc. there ? Then it wouldn't be necessary to use FindArduino.cmake when you already know you are building for Arduino. (e.g. there is no FindWindows.cmake, you simply are on Windows, or the cmake run fails). The toolchain file should be mostly done after the first three set() calls you have. More or less all of the rest should be in Arduino.cmake or Arduino-GNU- C/CXX.cmake. The functions for setting up additional targets look ok. What should find_sources() be used for ? This looks out of place. Thanks Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake