[CMake] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
Hello, I want to add VTK as an external project, but I have a few questions. Looking online at examples of other projects using vtk as an external project, many of them use a 'superbuild' style technique (example here from the archives: [1]). By that I mean that they have some option to enable

[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

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Matthew Woehlke
On 2014-06-02 17:48, jmerkow wrote: > I want to add VTK as an external project, but I have a few questions. > > Looking online at examples of other projects using vtk as an > external project, many of them use a 'superbuild' style technique > [...] they have some option to enable SuperBuild (or a

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
I see, that makes a lot of sense. And in order to pass options from the 'superbuild' build to the 'normal' build you make them options as command line args in your ExternalProhect_Add command? i.e.: set( proj my_prog ) ExternalProject_Add( ${proj} DOWNLOAD_COMMAND "" SOURCE_DIR "${${p

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Jean-Christophe Fillion-Robin
Hi Jameson, To specifically address the issue you described, I started to develop an (experimental) module extending ExternalProject and providing some convenience function. Documentation is far from being perfect but looking at (1) the tests: https://github.com/commontk/Artichoke/tree/master/

[CMake] Bracket Argument

2014-06-02 Thread James Bigler
Are there some good examples of why one would use bracket arguments? I'm trying to understand the anticipated use cases. The bracket comments are great for a /**/ substitute. James -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wi

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
Jc, Thanks a lot this may be exactly what I am looking for. Basically I include ExternalProjectDependency in my project, then mark_as_superbuild() options/vars that I want to pass back to the 'normal' build. Add the external project with 'CMAKE_CACHE_ARGS' and this will pass those variables to

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Jean-Christophe Fillion-Robin
Hi Jameson, That is indeed the idea. To clarify even further, 1) the call to ExternalProject_Include_Dependencies [1] should be added before "ExternalProject_Add". It will recursively include the needed dependencies. 2) By simply adding an additional parameter: by default ${_EP_AR