Re: [CMake] cmake project patterns / examples

2014-06-04 Thread Iosif Neitzke
The terminology of in-source and out-of-source for where the CMakeLists.txt and *.cmake files exist temporarily threw me off, as with CMake, in-source and out-of-source usually refer to where the generated build files are placed. On Wed, Jun 4, 2014 at 12:23 AM, Adam wrote: > Thanks for the comme

Re: [CMake] cmake project patterns / examples

2014-06-03 Thread Adam
Thanks for the comments I've update the wiki. Top-level only now marked as anti-pattern https://github.com/toomuchatonce/cmake-examples/wiki/cmake-patterns-and-examples If there are other patterns / anti-patterns you've seen please send me a pull request and I'll add them. I'm particularly intere

Re: [CMake] cmake project patterns / examples

2014-06-03 Thread Chuck Atkins
"Just put all the build commands in the top level cmake file." Definitely an anti-pattern. As you mentioned, it definitely doesn't scale. The problem with even doing this for a simple project is that it builds this behavior for people trying to learn cmake through simple examples. This very ver

Re: [CMake] cmake project patterns / examples

2014-06-03 Thread Iosif Neitzke
Great to see these examples with pros and cons. I believe the staticlibs-include example [0] pattern, though mentioned in Mastering CMake [1], generally is deprecated in favor of add_subdirectory with CMakeLists.txt at each level for self-contained projects. [0] https://github.com/toomuchatonce/

[CMake] cmake project patterns / examples

2014-06-02 Thread Adam Boseley
There's a lot of legacy examples around the web but not too many using the newer features. What is the current best practise? Here's some simple examples https://github.com/toomuchatonce/cmake-examples/wiki/cmake-patterns-and-examples Are these patterns or anti-patterns? Regards, Adam -- Powe