Hi, I'm still trying to get up to speed on CMake, but I have a couple of questions that may fall into a sort of 'best practices' category, or just generally wondering if someone can point me to a couple examples that may be similar to what I want to accomplish.<div>
<br></div><div>I'm starting a new project that will be targeting Raspberry Pi <a href="http://www.raspberrypi.org/">http://www.raspberrypi.org/</a> (essentially Linux/Arm). I'd like to follow a development process that includes unit testing + mocks. I recently read the book <a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c">http://pragprog.com/book/jgade/test-driven-development-for-embedded-c</a> and I'm interested in following this approach and using the test framework CppUTest <a href="http://cpputest.org">http://cpputest.org</a></div>
<div><br></div><div>I want the build to support dual-targeting -- meaning the code / build is designed to run on at least two targets: the dev. machine and the target hardware. This allows me to design and test most of the code independent of the hardware. This is the approach outlined in the book. I'd also like to support cross-compilation so I can build for the target on the dev. machine to avoid longer compilation times on slower Pi hardware.</div>
<div><br></div><div>I also want to support running the tests via the build - both on the dev. machine - b/c it is fast, but I also want to support building/running the same tests on the target hardware. </div><div><br></div>
<div>It seemed like CMake had some nice features that could make setting this up easier, so I'm trying to build out a skeleton project to see how well it works. I hacked together a starter project for this here: <a href="https://github.com/davisford/cmake-cpputest">https://github.com/davisford/cmake-cpputest</a> - currently it will build a pseudo LedDriver and I can also build & run the tests. I have yet to add the Arm support for the Pi.</div>
<div><br></div><div>I'd appreciate any pointers / suggestions or constructive criticism on what I've currently got - how I could do it better, or links to other projects or sections of projects that would be helpful as input.</div>
<div><br></div><div>Thanks in advance!</div><div><br></div><div>Davis</div>