On 07/12/2018 15.48, Christian Ehrlicher wrote: > One really nice feature what I miss in cmake is the '-project' option > from qmake. Basically it scans the current directory, adds all sources, > headers and ui-files and creates a small .pro file out of it. It's a > very convenient feature when you just want to compile a small test > project. Creating an initial CMakeLists.txt from scratch takes much > longer and therefore this is the only place where I use qmake (outside > the qt sources)
I was going to say something incredulous, but... yeah, when you're talking about a *Qt* project, by the time you get done mentioning AUTOMOC and .ui files, you're talking at least a half dozen lines of CMake logic. So I can see the use :-). > Maybe this can be added - simply read the current directory and pass the > files found to a template CMakeLists.txt to create the project type you > want I'm not sure if this belongs in CMake *itself*, but I think having a script (Python? Bash? Other?) to do it would be a great idea. It could take options to control behavior: - project name - executable name (if different from project) - C++ standard version (optional with a sensible default) - ...others? -- Matthew _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
