Re: [CMake] cmake --find-package deprecated?

2018-04-27 Thread Jeandet Alexis
Hi Alexander, all,

here is a WIP patch
https://gitlab.kitware.com/cmake/cmake/merge_requests/2017

Any advise, help on how to improve this is welcome.

Alexis.
On Tue, 2018-04-03 at 22:00 +0200, Alexander Neundorf wrote:
> On 2018 M04 3, Tue 16:01:58 CEST jeandet wrote:
> > Hi all,
> > 
> > Reading the documentation I can see:
> > https://cmake.org/cmake/help/v3.11/manual/cmake.1.html?highlight=fi
> > nd%2
> > 0package#find-package-tool-mode id="-x-evo-selection-start-marker">
> > "
> > Note
> > 
> > This mode is not well-supported due to some technical limitations.
> > It
> > is kept for compatibility but should not be used in new projects.
> > "
> > 
> > Does this means that:
> >   1) We will always support this but it's limited.
> >   2) We will be supported for a long time, but you shouldn't use
> > it.
> >   3) We plan to remove this soon, don't use this!
> 
> I think it's in 2).
>  
> > In fact this mode would really be useful outside of CMake, to use
> > libraries/stuff which doesn't provide pc files but only CMake
> > packages.
> > Even if this has limitations, it's better than nothing.
> 
> Yes, that was my motivation a few years back.
> There is even a cmake.m4 which adds a cmake_find_package macro for
> configure.
> 
> Since then, there was close to no feedback.
> I also can't remember any volunteer contributions for this feature.
> Currently it has more limitations than it had 7 or 8 years ago or so.
> 
> The idea was to run cmake in script mode, and basically just execute
> the 
> requested FindFoo.cmake script, which basically searches a set of
> directories 
> and returns the results.
> With imported targets, their link interfaces and e.g. generator
> expressions 
> things got more complicated.
> 
> I'd be happy if somebody picks up the work and makes this feature
> work 
> properly.
> 
> Alex
> 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] Unknown generator output with CMake

2017-03-28 Thread Jeandet Alexis
Hi,

I play with CMake on PythonQt build. I faced a chalenge:

PythonQt is composed of:
1)The generator which wrap Qt api(parses Qt sources to produce
cpp/python wrappers)
2)The Lib (main engine)
3)The wrappers generated by 1)

The chalenge was to build in this order:
1) build generator
2) generate from generator wrappers 
3) build Lib
4) build wrappers

My issue was to build wrappers from generator output since I can't
predict how many files it will produce. And what I understood is that
Glob can only be used at config time and I cant use *.cpp as sources.

So my basic solution was to build generator and call it at config time
using ExternalProject and execute_process:
https://github.com/jeandet/PythonQt/blob/cmake-clean/cmake/generated_cp
p.cmake
Then build src and wrapper normally.
I'm a CMake beginner but I feel that this solution is ugly and it slows
down config time.

Did I miss something? 

Best regards,
Alexis.-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake