Re: [CMake] [New Module] Arduino CMake

2012-01-25 Thread Alexander Neundorf
On Wednesday 25 January 2012, Alfa Omega wrote:
 A little addendum to what I wrote earlier.
 
 On Wed, Jan 25, 2012 at 8:54 AM, Alfa Omega queezythegr...@gmail.comwrote:
  2012/1/24 Alexander Neundorf a.neundorf-w...@gmx.net
  
  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_
  
  ArduinoProcessing.cmake is a prototype, and isn't used with Arduino
  CMake, so you can ignore that.
  
  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.
  
  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).
 
 When I originally wrote this, I wanted to hide as much of the boilerplate
 code as I could (hence I wanted people to use those two functions
 documentated at the top). Now I'm starting to think that apart from
 setup_arduino_compiler and setup_arduino_core (which could be merged into
 one) everything else could be used if someone who wanted control the build
 process manually. So that's why the documentation for the rest of the
 function where omitted from the top.

Ok.
Still they should all use the arduino_ prefix.
 
  setup_arduino_compiler() looks wrong.
  
  What do you mean by it looks wrong (the name might not be the best :))?
 
 Do you mean setup_arduino_compiler and setup_arduino_core should be merged?

Well, this should be done in the host/compiler setup steps, i.e. in 
Arduino.cmake and Arduino-GNU-C.cmake and Arduino-GNU-CXX.cmake (this is using 
gcc, right ?).

 
  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).
  
  That is a good point, but then how could I specify that I want a specific
  minimal version?
  
  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.
  
  What is the best way to initialize the compiler flags? And where should I
  move the rest of the stuff that in the toolchain file?

See above, in the platform specific files.
 
  The functions for setting up additional targets look ok.
  
  What should find_sources() be used for ?
  
  It'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).

Can you please explain more ?
Are these source files from the user, or are they part of arduino ?

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


Re: [CMake] [New Module] Arduino CMake

2012-01-24 Thread Alfa Omega
Hi,

Support for Teamcity is available, but not publicly accessible. I have a
patched version of CMake/CTest which has a special flag that enables
Teamcity service messages. I use it internally at my company, but I want to
integrate it into CMake (so that I don't have have a custom build of
CMake). Test aggregation works perfectly. I also have a CMake module to
that simplifies emitting Teamicty service messages.

Tomasz B.



On Tue, Jan 24, 2012 at 8:31 AM, Johan Björk p...@spotify.com wrote:

 Hi Alfa,

 We are really interested in the teamcity + CTest support. Is that
 available somewhere already?

 Thanks
 /Johan


 On Sun, Jan 22, 2012 at 7:51 PM, Alfa Omega queezythegr...@gmail.comwrote:

 Hi everyone,

 I'm not quite sure what the correct procedure is for becoming a CMake
 contributor, but from what I've read I should send a email here if I want
 to add a new module to cmake.

 For the past year I've been hosting my CMake modules on GitHub (
 https://github.com/queezythegreat/arduino-cmake) and the project is
 mature enough that it could be included into CMake. The project is called
 Arduino CMake and it adds support for building Arduino projects. It is a
 alternative to the Arduino IDE, and works on Windows, Linux and Mac.

 The project is growing and getting more and more users, and I think it's
 would be a god fit to start bundling it with CMake. The project is well
 documented both from a developer standpoint as well as the user side.

 So what are the steps I should take in order to integrate my project into
 CMake?

 I also would like to contribute back some extensions to the CMake, such
 as Teamcity support for CTest. Any information would be greatly
 appreciated.

 Tomasz Bogdal

 --

 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





-- 

--=[QTZ]=--
QueezyTheGreat
--

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

Re: [CMake] [New Module] Arduino CMake

2012-01-24 Thread Alexander Neundorf
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


Re: [CMake] [New Module] Arduino CMake

2012-01-24 Thread Alfa Omega
2012/1/24 Alexander Neundorf a.neundorf-w...@gmx.net

 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_

ArduinoProcessing.cmake is a prototype, and isn't used with Arduino CMake,
so you can ignore that.


 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.

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).

setup_arduino_compiler() looks wrong.

What do you mean by it looks wrong (the name might not be the best :))?


 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).

That is a good point, but then how could I specify that I want a specific
minimal version?

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 ?

It'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).

This looks out of place.

 Thanks
 Alex




-- 

--=[QTZ]=--
QueezyTheGreat
--

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

Re: [CMake] [New Module] Arduino CMake

2012-01-23 Thread Alexander Neundorf
On Sunday 22 January 2012, Alfa Omega wrote:
 Hi everyone,
 
 I'm not quite sure what the correct procedure is for becoming a CMake
 contributor, but from what I've read I should send a email here if I want
 to add a new module to cmake.
 
 For the past year I've been hosting my CMake modules on GitHub (
 https://github.com/queezythegreat/arduino-cmake) and the project is mature
 enough that it could be included into CMake. The project is called Arduino
 CMake and it adds support for building Arduino projects. It is a
 alternative to the Arduino IDE, and works on Windows, Linux and Mac.
 
 The project is growing and getting more and more users, and I think it's
 would be a god fit to start bundling it with CMake. The project is well
 documented both from a developer standpoint as well as the user side.
 
 So what are the steps I should take in order to integrate my project into
 CMake?

Does it follow the regular cross compiling conventions ?
http://www.vtk.org/Wiki/CMake_Cross_Compiling

From a quick look it didn't look like it does.
If so, why did you chose to do it differently ?

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


Re: [CMake] [New Module] Arduino CMake

2012-01-23 Thread Alfa Omega
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.

Tomasz B.

2012/1/23 Alexander Neundorf a.neundorf-w...@gmx.net

 On Sunday 22 January 2012, Alfa Omega wrote:
  Hi everyone,
 
  I'm not quite sure what the correct procedure is for becoming a CMake
  contributor, but from what I've read I should send a email here if I want
  to add a new module to cmake.
 
  For the past year I've been hosting my CMake modules on GitHub (
  https://github.com/queezythegreat/arduino-cmake) and the project is
 mature
  enough that it could be included into CMake. The project is called
 Arduino
  CMake and it adds support for building Arduino projects. It is a
  alternative to the Arduino IDE, and works on Windows, Linux and Mac.
 
  The project is growing and getting more and more users, and I think it's
  would be a god fit to start bundling it with CMake. The project is well
  documented both from a developer standpoint as well as the user side.
 
  So what are the steps I should take in order to integrate my project into
  CMake?

 Does it follow the regular cross compiling conventions ?
 http://www.vtk.org/Wiki/CMake_Cross_Compiling

 From a quick look it didn't look like it does.
 If so, why did you chose to do it differently ?

 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

Re: [CMake] [New Module] Arduino CMake

2012-01-23 Thread Johan Björk
Hi Alfa,

We are really interested in the teamcity + CTest support. Is that available
somewhere already?

Thanks
/Johan


On Sun, Jan 22, 2012 at 7:51 PM, Alfa Omega queezythegr...@gmail.comwrote:

 Hi everyone,

 I'm not quite sure what the correct procedure is for becoming a CMake
 contributor, but from what I've read I should send a email here if I want
 to add a new module to cmake.

 For the past year I've been hosting my CMake modules on GitHub (
 https://github.com/queezythegreat/arduino-cmake) and the project is
 mature enough that it could be included into CMake. The project is called
 Arduino CMake and it adds support for building Arduino projects. It is a
 alternative to the Arduino IDE, and works on Windows, Linux and Mac.

 The project is growing and getting more and more users, and I think it's
 would be a god fit to start bundling it with CMake. The project is well
 documented both from a developer standpoint as well as the user side.

 So what are the steps I should take in order to integrate my project into
 CMake?

 I also would like to contribute back some extensions to the CMake, such as
 Teamcity support for CTest. Any information would be greatly appreciated.

 Tomasz Bogdal

 --

 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

--

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

Re: [CMake] [New Module] Arduino CMake

2012-01-22 Thread Stephen Kelly
Alfa Omega wrote:

 Hi everyone,
 
 I'm not quite sure what the correct procedure is for becoming a CMake
 contributor, but from what I've read I should send a email here if I want
 to add a new module to cmake.

Hi Tomasz,

This page should have all you need to know:

http://www.itk.org/Wiki/CMake:Module_Maintainers

It's probably more appropriate to email the developers list:

http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Thanks,

Steve.


 
 For the past year I've been hosting my CMake modules on GitHub (
 https://github.com/queezythegreat/arduino-cmake) and the project is mature
 enough that it could be included into CMake. The project is called Arduino
 CMake and it adds support for building Arduino projects. It is a
 alternative to the Arduino IDE, and works on Windows, Linux and Mac.
 
 The project is growing and getting more and more users, and I think it's
 would be a god fit to start bundling it with CMake. The project is well
 documented both from a developer standpoint as well as the user side.
 
 So what are the steps I should take in order to integrate my project into
 CMake?
 
 I also would like to contribute back some extensions to the CMake, such as
 Teamcity support for CTest. Any information would be greatly appreciated.
 
 Tomasz Bogdal


--

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


Re: [CMake] [New Module] Arduino CMake

2012-01-22 Thread Alfa Omega
Thanks for the quick response. I'll repost my question on the developer
mailing list. I probably need someones approval to get Git access (for step
5)...


Tomasz B.

On Sun, Jan 22, 2012 at 10:20 PM, Stephen Kelly steve...@gmail.com wrote:

 Alfa Omega wrote:

  Hi everyone,
 
  I'm not quite sure what the correct procedure is for becoming a CMake
  contributor, but from what I've read I should send a email here if I want
  to add a new module to cmake.

 Hi Tomasz,

 This page should have all you need to know:

 http://www.itk.org/Wiki/CMake:Module_Maintainers

 It's probably more appropriate to email the developers list:

 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

 Thanks,

 Steve.


 
  For the past year I've been hosting my CMake modules on GitHub (
  https://github.com/queezythegreat/arduino-cmake) and the project is
 mature
  enough that it could be included into CMake. The project is called
 Arduino
  CMake and it adds support for building Arduino projects. It is a
  alternative to the Arduino IDE, and works on Windows, Linux and Mac.
 
  The project is growing and getting more and more users, and I think it's
  would be a god fit to start bundling it with CMake. The project is well
  documented both from a developer standpoint as well as the user side.
 
  So what are the steps I should take in order to integrate my project into
  CMake?
 
  I also would like to contribute back some extensions to the CMake, such
 as
  Teamcity support for CTest. Any information would be greatly appreciated.
 
  Tomasz Bogdal


 --

 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




-- 

--=[QTZ]=--
QueezyTheGreat
--

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