Re: RFE: CMake AutoRequires?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fabio Valentini wrote:
> Sure, but is this doable? CMakeLists.txt files are very complex and
> border on a Turing-complete language.

Technically, CMake *is* a Turing-complete language – if and only if you use 
recursive functions.

> Does cmake support passing in "-D foo" options and returning a list of
> dependencies it wants for those options?
> Because otherwise you'd be back to reimplementing a CMake file format
> parser / interpreter just to get the list dependencies you need.

I would suggest just doing a regex grep for find_package(Foo … REQUIRED), 
similar to how the Python autoRequires generator works. Python is also a 
Turing-complete language, and (as I understand it) also allows imports in 
the middle of the code, yet nobody would expect the autoRequires generator 
to do the right thing for:

if some_library_function():
  import foo
  foo.bar()

depending on whether some_library_function() is always true, always false, 
or sometimes either. The semantics would be similar for the CMake 
autoRequires generator. It can always be turned off, filtered, and/or 
missing dependencies manually added. It would still be better than nothing.

        Kevin Kofler
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux