summaryrefslogtreecommitdiffstats
path: root/cmake/QtProcessConfigureArgs.cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* CMake: Implement configure -qpaJoerg Bornemann2020-09-111-0/+1
| | | | | Change-Id: I38a938cda91a525d2af22deec864c6a12af3e29d Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Teach QtProcessConfigureArgs.cmake to configure other modulesJoerg Bornemann2020-09-021-12/+18
| | | | | | | | | | | | | | | | | | | | Until now, QtProcessConfigureArgs.cmake could only handle qtbase and the top-level build. Add the variable MODULE_ROOT that the user can point to the module that is to be configured. Example - QtDeclarative can now be configured like this: cd qtdeclarative-build-dir echo -qml-network > config.opt cmake -DOPTFILE=config.opt -DMODULE_ROOT=<source-root>/qtdeclarative \ -DCMAKE_COMMAND=<install-prefix>/bin/qt-cmake-private \ -P <source-root>/qtbase/cmake/QtProcessConfigureArgs.cmake A convenience script that saves the user from entering this unwieldy incantation will be added in a subsequent commit. Change-Id: If46103de3a8eb84b15e7600ebfec25544451e1d5 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Support configure tests of type 'linkerSupportsFlag'Joerg Bornemann2020-08-231-0/+1
| | | | | | Task-number: QTBUG-86155 Change-Id: I3764d99cd4ad1c432b499ec9ba7c4c48391fa421 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure setting superfluous featuresJoerg Bornemann2020-08-231-5/+7
| | | | | | | | | | | | | Command line options like -debug result in setting the variable INPUT_debug. INPUT_debug is mapped to the CMake argument -DCMAKE_BUILD_TYPE=Debug. INPUT_debug also matches the feature 'debug', and the CMake argument -DFEATURE_debug=ON was passed. Do not pass -DFEATURE_xxx CMake arguments for inputs that are already handled. Change-Id: If096dff1c6dd694545c6f671f5f3512a43c3ec50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support configure tests of type 'compilerSupportsFlag'Joerg Bornemann2020-08-201-0/+1
| | | | | | Task-number: QTBUG-86155 Change-Id: Iaa5c48b6508870a0f6afdf9df66cd2e634fe19b3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -qreal <type>Joerg Bornemann2020-08-191-0/+1
| | | | | | | | | The configure argument -qreal <type> maps to the CMake argument -DQT_COORD_TYPE=<type>. Fixes: QTBUG-83325 Change-Id: I94970f31ccfb241b1dd4f1d9b6cef25d6684dc05 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle -D, -I, -F and -L configure argumentsJoerg Bornemann2020-08-171-0/+4
| | | | | | | | | | | | | | Introduce new CMake variables and map -D to QT_EXTRA_DEFINES, -I to QT_EXTRA_INCLUDEPATHS, -L to QT_EXTRA_LIBDIRS, and -F to QT_EXTRA_FRAMEWORKPATHS. Those variables only affect the Qt build, not user projects. Fixes: QTBUG-85878 Change-Id: I229df2eed1505a2619068d0d32975962b052569a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: De-duplicate list input handling code in QtProcessConfigureArgsJoerg Bornemann2020-08-171-13/+10
| | | | | Change-Id: I9fd77dd81f67fcc9a0306ab0d627257f209cdb08 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-implement configure/qmake's command line handling in CMakeJoerg Bornemann2020-08-171-100/+530
| | | | | | | | | | | | | | | | | | | | | | | | | We extend configurejson2cmake to read the "commandline" information from configure.json. This data is then translated to CMake function calls and written it into commandline.cmake files. We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake files to feed our command line handling code, which is a re-implementation of the command line handling in qt_configure.prf. The command line handler sets INPUT_xxx variables, similar to configure/qmake's config.input.xxx variables. The INPUT_xxx values are translated - to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature, - to corresponding CMake variables if such a variable is known, - or to -DINPUT_xxx=yyy CMake arguments. Configure arguments that have an entry in cmake/configure-cmake-mapping.md are actually implemented. Other arguments are likely to need more work. Task-number: QTBUG-85373 Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix -pch configure optionJoerg Bornemann2020-07-081-1/+1
| | | | | | | This amends dbd3c759654. Change-Id: Ia87d60f1da65624bc5c6ffb915eecf99a2d8bdc0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support the -rpath configure argumentJoerg Bornemann2020-07-081-0/+10
| | | | | | Task-number: QTBUG-85373 Change-Id: I04bdf307556aeab607a95d153cbe19254044c1f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support the -c++std configure argumentJoerg Bornemann2020-07-081-0/+4
| | | | | | Task-number: QTBUG-85373 Change-Id: I071c1d0c8bf96b34c5733d039b8a61e54e416800 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support the -qtnamespace configure argumentJoerg Bornemann2020-07-081-0/+3
| | | | | | Task-number: QTBUG-85373 Change-Id: I3f995b31339a3c2b0c97ca806c652bc67846fc69 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support mkspec-related configure argumentsJoerg Bornemann2020-07-081-0/+16
| | | | | | Task-number: QTBUG-85373 Change-Id: I44ae15b4c05f23442ac6b9d69d31f22f01d0a48c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support -static, -shared and -framework configure argumentsJoerg Bornemann2020-07-081-0/+7
| | | | | | Task-number: QTBUG-85373 Change-Id: I0a1db7dcb4cb1738fa1ba0a687d41c5f5a613364 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support configure -force_debug_infoJoerg Bornemann2020-07-061-0/+6
| | | | | | Task-number: QTBUG-85373 Change-Id: Ia798fc2cf715aed9157e1d9e2f64187c16e38bcf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support build config-related configure optionsJoerg Bornemann2020-07-061-0/+21
| | | | | | | | | | This add support for the following options: -debug, -release, -debug-and-release. For the latter, the "Ninja Multi-Config" generator is auto-detected, if ninja is available. Task-number: QTBUG-85373 Change-Id: Ide0ca44e5f4c74657147e89d71e8d71c4f6a4c45 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support -bindir, -libdir, -*dir configure argumentsJoerg Bornemann2020-07-061-0/+10
| | | | | | Task-number: QTBUG-85373 Change-Id: I0df181cb017561c3f0af5ab3fecb76008b89c0d2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-work configure flags for CMake generatorsJoerg Bornemann2020-07-061-5/+29
| | | | | | | | | | | | | | | | | Remove the -cmake-makefiles configure argument as its meaning was in essence "do not pass a -G argument to CMake". Instead, we add the following arguments: -cmake-generator <name> to pass -G <name> to CMake -cmake-use-default-generator to pass no -G argument to CMake If none of those arguments is given, we try to autodetect the generator. If a ninja executable is found, we prefer the Ninja generator. On Unix we fall back to "Unix Makefiles". On Windows, we do a poor man's compiler detection and select one of "NMake Makefiles", "NMake Makefiles JOM" and "MinGW Makefiles". Change-Id: Ic36669bd50956d15fbc71cee73720732cd4bfab8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Teach configure.bat the -cmake argumentJoerg Bornemann2020-07-061-0/+115
The configure scripts need to translate configure options to CMake arguments. It is not sensible to implement this translation twice, in sh and Windows batch language, so we're doing this once, in CMake language. The configure scripts write their options into config.opt and call a CMake script that reads config.opt, does the translation to CMake arguments and calls CMake to generate the build system. While we're at it, implement some more translations than the sh configure provided, like -extprefix, -top-level and -skip. Fixes: QTBUG-85349 Fixes: QTBUG-85350 Task-number: QTBUG-85373 Change-Id: Ida5d8b2a3c178b9349d41ec76d190c69a9456e74 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>