[Development] Switch the main "Qt Build System"
alexandru.croitor at qt.io
Tue Jun 9 11:05:13 CEST 2020
> On 9. Jun 2020, at 10:38, Shawn Rutledge <Shawn.Rutledge at qt.io> wrote:
> Well that’s a little extra maintenance work then; I agree that configure is nicer, but maybe we can expect the cmake way of configuring to generally be more up-to-date if that’s where each change starts.
Are you suggesting modifying upstream cmake to accept things like --developer-build and map that to -DDEVELOPER_BUILD=ON or something along those lines?
>> Indeed currently you need to run CMake at least once to get all the checkboxes. I have an idea of how we might improve that (so you don't have to run it once) but it's not done yet.
> Do you want to explain?
It appears I was mistaken. I was under the impression that the CMake Gui can show some options before doing "configure" at least once, but it doesn't seem to be the case.
Some details about that here https://gitlab.kitware.com/cmake/cmake/-/issues/17083
I think we'll have to investigate if there's any better way to address discoverability. One random idea would be to provide a --list-features option to configure which behind the scenes calls a separate cmake script that finds and includes all configure.cmake files, collates a list of features and prints them on the command line.
>>> Will we keep using the configure.json files and generating configure.cmake from them?
>> It's possible, but it might make sense to to use configure.cmake as the source of truth as well. I don't believe we discussed that internally yet.
> At least json is easier to parse, if we try to write other tooling.
That's true. But using tooling to forever generate cmake files from json also comes with its downsides (maintenance, inability to express certain constructs, people forgetting to use it, etc).
For the last one you could introduce more tooling like a sanity bot check that a cmake file always needs to be generated if a .json file got touched, but that might have false positives, etc.
Personally I think having one source of truth is better. And I think tooling for parsing cmake files will appear in time as well.
> Development mailing list
> Development at qt-project.org
More information about the Development