summaryrefslogtreecommitdiffstats
path: root/cmake/QtProcessConfigureArgs.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Use bracket-based escaping for all list arguments in a configure stringAlexey Edelev2021-04-121-2/+2
| | | | | | | | | | | | | The 'list(TRANSFORM cmake_args REPLACE "\\[\\[;\\]\\]" "\\\\;")' call breaks the list arguments added when evaluating the 'INPUT_' values. Therefore, it's necessary to apply bracket-based escaping to all list arguments instead of the standard escaping. Amends 856fadf85ca2a3b70878d01d32e4d4cef807b8a9 Fixes: QTBUG-92459 Change-Id: Ifd4e0ca5f549a1c7fab9ceb587ed355250c4e677 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Build minimal subset of tests in desktop static buildsAlexandru Croitor2021-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Add new configure option -make minimal-static-tests and CMake option QT_BUILD_MINIMAL_STATIC_TESTS. In conjunction with QT_BUILD_TESTS it will enable building a minimal subset of tests when targeting a static desktop Qt build. In qtbase the minimal subset includes all the auto tests of testlib, tools, corelib and cmake. In particular this will also do cmake build tests and qmake build tests (tst_qmake) Adjust CI instructions to enable building a minimal subset of static tests when a platform configuration is tagged with the MinimalStaticTests feature. Fix and skip a few tests that were failing. Pick-to: 6.1 Task-number: QTBUG-87580 Task-number: QTBUG-91869 Change-Id: I1fc311b8d5e743ccf05047fb9a7fdb813a645206 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make find_package in configure.cmake a hard errorJoerg Bornemann2021-03-311-0/+5
| | | | | | | | | | | | | | | qt3d/9a473a3c9b246f4895ae73d7060745b8b199a6c5 introduced a find_package call in a configure.cmake file, very subtly breaking top-level builds with configure. The find_package call results in errors of the cmake call that runs QtProcessConfigureArgs.cmake (see bug report for details). Create a find_package stub that errors out with a helpful message. Task-number: QTBUG-92163 Change-Id: I06db0bf219b965e93b78c690e9f7ad868196ddb9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix processing of list arguments passed to the 'configure' scriptAlexey Edelev2021-03-301-3/+11
| | | | | | | | | | | | | | | | list(TRANSFORM ...) unexpectedly removes semicolon escaping in list items. So the list arguments seems to be broken. The 'bracket argument' suppresses this behavior. Right before forwarding command line arguments to the cmake call, 'bracket arguments'are replaced by escaped semicolons back. Recent fix escapes all semicolons of the 'configure_args' and glues all arguments to a single 'list'. Amends df8e1c8e588cb0529b2bc02faef1022ef3f29145 Change-Id: I4a458b9e3add307b36924c4c7c7f739d348f9343 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Handle arbitrary configure arguments that contain listsTor Arne Vestbø2021-03-231-2/+4
| | | | | | | | | Passing e.g. -- -DQT_BUILD_SUBMODULES="qtbase;qtdeclarative" to configure would fail because the module list was not preserved as a single argument. Change-Id: If685d0d541201597a2c2a5dc3d55b5d1ae51da22 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix configure build due to use of qt_set01 in configure.cmakeNiclas Rosenvik2021-03-171-0/+1
| | | | | | | | | | | The change "Enable X11 on other platforms than just Linux" uses qt_set01 in a configure.cmake file but does not add it to the stubs list in QtProcessConfigureArgs.cmake thus breaking builds based on configure. Add a defstub with qt_set01 to fix this. Change-Id: Ia3e0ec61df5228f88f77f631968f6f96d567ec8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove the -qmake and -cmake configure argumentsJoerg Bornemann2021-03-111-3/+1
| | | | | | | | | | Qt is built with CMake since 6.0 and the QMake build system was removed in 6.1. It's time to remove the -cmake and -qmake configure arguments for Qt 6.2. Fixes: QTBUG-88286 Change-Id: Ie726ec364ded025f8d93bd69b469561a6ae40aa9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QT_CONFIGURE_RUNNING variable for configure.cmake filesJoerg Bornemann2021-03-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | configure.cmake files are read twice when using the configure script / qt-configure-module: First, when configure is running and a second time, when CMake creates the local build system files. In the first run, not every function and esp. no targets are available. Code in configure.cmake that accesses targets or calls functions unknown to configure will fail at the configure stage. This patch introduces the QT_CONFIGURE_RUNNING variable that can be used in configure.cmake files to guard such code: if(QT_CONFIGURE_RUNNING) set(_qt_coord_type double) else() get_property(_qt_coord_type TARGET Qt6::Core PROPERTY INTERFACE_QT_COORD_TYPE) endif() Change-Id: Iff39924d6a5133379d28c8204d7b7afdf47de5c8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do not rewrite boolean INPUTs if they have a corresponding featureAlexey Edelev2021-02-181-12/+0
| | | | | | | | | | | | | | | | | | | Initial replacement of boolean INPUT_ variables to the FEATURE_ variables was wrongly changed to updating of the INPUT_ variable value to ON/OFF value. This causes potential issues when INPUT_ variable has explicit check for 'yes' or 'no'. The feature evaluation step enables FEATURE_ variables in case if the corresponding INPUT_ variable contains a positive CMake value. So there is no need to process boolean INPUTs at the argument processing step. Also no need to keep the special opengl case, since it will be processed correctly. Fixes: QTBUG-91158 Pick-to: 6.0 Pick-to: 6.1 Change-Id: I96bb7903a904ae3cf788d7ef7d4e0c019046eb95 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* configure: Don't guess the compiler if the user already chose oneJoerg Bornemann2021-02-111-4/+41
| | | | | | | | | | | | We must not guess the compiler from the -platform argument if one of the following holds: - the CXX/CC environment variables are set - the CMAKE_CXX_COMPILER/CMAKE_C_COMPILER variables are passed Pick-to: 6.1 Fixes: QTBUG-90914 Change-Id: Iff7a0e7b8857f77333f1705f118d7952af5234ba Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* configure: Fix handling of -translationdir argumentJoerg Bornemann2021-02-081-1/+2
| | | | | | | | | | This is supposed to be mapped to INSTALL_TRANSLATIONSDIR, not INSTALL_TRANSLATIONDIR (without the s). Pick-to: 6.0 6.1 Fixes: QTBUG-90946 Change-Id: Icec93ffc0dc80d9ac7cf6cf1b13824bc2a1e795f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Add proactive check of generator multi-config capabilitiesAlexey Edelev2021-01-051-0/+10
| | | | | | | | | | Add explicit error, if multi-config build is requested, but selected generator doesn't support it. Fixes: QTBUG-88287 Pick-to: 6.0 Change-Id: I6dba589bb59ad69fa07221c657df272ec75c359b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add extra targets to run single benchmark using CMake generatorAlexey Edelev2020-12-071-27/+26
| | | | | | | | | | | | | | | | | | Add custom targets with '_benchmark' suffixes to make run of benchmarks using generators possible, e.g.: $ ninja tst_bench_qudpsocket_benchmark Extend '-[no]make' option to pass benchmark. Rework '-[no]make' processing to unify these options processing. Also looks like it doesn't make sense to enable benchmarks without having test enabled. So '-DQT_BUILD_BENCHMARKS' enables test as own dependency automatically. Task-number: QTBUG-89076 Pick-to: 6.0 Change-Id: Ieee9eadaf6d75a1efec120242d6eb786ace1b071 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Name QT_NO_MAKE_*/BUILD_* variables consistentlyJoerg Bornemann2020-11-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency, apply the following renamings: QT_NO_MAKE_EXAMPLES -> QT_BUILD_EXAMPLES_BY_DEFAULT QT_NO_MAKE_TESTS -> QT_BUILD_TESTS_BY_DEFAULT QT_NO_MAKE_TOOLS -> QT_BUILD_TOOLS_BY_DEFAULT BUILD_EXAMPLES -> QT_BUILD_EXAMPLES BUILD_TESTING -> QT_BUILD_TESTS This should help to better convey the difference between "BUILD" and "NO_MAKE". To configure tests, but not to build them by default, pass the following to CMake: -DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF Analoguous for examples: -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF Tools can be excluded from the default build with: -DBUILD_TOOLS_BY_DEFAULT=OFF The variable BUILD_TESTING is still available and initialized with the value of QT_BUILD_TESTS. Pick-to: 6.0 6.0.0 Change-Id: Ie5f29dfbdca8bfa8d687981dfe8c19c0397ca080 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure not to pass clang compilers for AndroidAlexandru Croitor2020-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | That breaks configuration with CMake version 3.18.x (but not 3.19 for some reason). Specifically configure ends up passing -DCMAKE_CXX_COMPILER=clang++ which overrides the compiler set by the CMake Android toolchain file, and at the very end of CMake's configuration it complains about You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_CXX_COMPILER= clang++ Which suddenly starts another configuration with the modified compilers, ends up detecting host compilers and libraries and basically everything breaks apart. Fix QtProcessConfigureArgs.cmake not to pass the compiler options if the mkspec contains 'android'. Who knows, we might need this for other platforms too at some point. Task-number: QTBUG-88460 Change-Id: Idd57870a7cb1009a4e7802e5b3d5ac735f2dacf6 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Add special processing of opengl configure optionAlexey Edelev2020-11-121-0/+5
| | | | | | | | | | Since feature evaluation expects explicit 'no' value for INPUT_opengl to disable either desktop or es2 opengl support, add special processing for -no-opengl option into QtProcessConfigureArgs.cmake Task-number: QTBUG-88142 Change-Id: Ib49123ee3e9f98035f6ec85a182382559f4db478 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure arguments handlingAlexey Edelev2020-11-121-1/+1
| | | | | | | | | | All configure arguments should be processed as strings and not be ignored if they satisfy CMake's FALSE criteria (see https://cmake.org/cmake/help/latest/command/if.html) Fixes: QTBUG-88424 Change-Id: I932038ad3c5999bed58957dec51fbf892bd650d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Map configure -hostdatadir to INSTALL_MKSPECSDIRJoerg Bornemann2020-11-101-0/+6
| | | | | | | | | | In the qmake-based build, the hostdatadir is the directory where "Data used by qmake" is located. In the CMake build the equivalent is INSTALL_MKSPECSDIR. Create the mapping accordingly. Fixes: QTBUG-88211 Change-Id: I9e3d1af24bc7f41333ef2269fced5ab3fcfa848d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -list-featuresJoerg Bornemann2020-11-101-0/+26
| | | | | | | | | Extend qt_configure_get_padded_string to make the feature list look like qmake's. Fixes: QTBUG-88144 Change-Id: I714f2b2f3537b506365a03b5b6bc3413e9cab167 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make Release the main config of a -debug-and-release buildJoerg Bornemann2020-11-101-1/+1
| | | | | | | | In configure we need to set the Release configuration first to make it the main configuration. Change-Id: I5fe744b0dcea009c4d672bf519b38c80c87475dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add quotes to cmake_args in guess_compiler_from_mkspec functionDavid Skoland2020-11-041-1/+1
| | | | | | | | These were omitted in the original change, which cause cmake builds to fail configuring Change-Id: I37996099aaa0d912ce06b1f06c175cc5cf159e33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add handling of user-defined INPUT_foo cache variablesAlexey Edelev2020-11-031-1/+1
| | | | | | | | | | | | "configure" script translates feature-related parameters to INPUT_ variables instead of FEATURE_. Both INPUT_ and FEATURE_ variables passed to cmake script are equivalent. FEATURE_ has higher priority in case if both are defined. Fixes: QTBUG-87755 Change-Id: If697a0d62ab839877a3196ea74e631582a570dda Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Let configure guess the compiler from mkspec argumentJoerg Bornemann2020-11-021-0/+20
| | | | | | | | | | | | The arguments -platform, -xplatform and -device determine the mkspec that's used for the qmake companion files. If the user specifies a mkspec that indicates usage of clang or icc, set the respective CMake variables to use one of those compilers. Fixes: QTBUG-87836 Change-Id: I2b10d819b0eb92a97d7f79672547b1e2d821cf33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix [qt-]configure[-module].bat arguments with backslashesJoerg Bornemann2020-10-301-0/+2
| | | | | | | | We must escape backslashes in CMake code that's to be evaluated and in the arguments we read from config.opt. Change-Id: I65d033c77f71888974983aa3d834acb2fe89f3fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix CMake generator auto-selection on WindowsJoerg Bornemann2020-10-221-1/+1
| | | | | | | The variable to check for a Windows host system was mis-typed. Change-Id: I25b14b80d25bfec0c1a00e99833520b6fb6a4b02 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* CMake: Fix INPUT_* names with dashesJoerg Bornemann2020-10-221-1/+2
| | | | | | | | | | | | In configure.json files we have inputs with dashes, e.g. bundlex-xcb-xinput. In configure.cmake files, these are read in their normalized form, e.g. INPUT_bundled_xcb_xinput. Normalize the input names in QtProcessConfigureArgs.cmake like we already do for feature names. Change-Id: Iece414d40a0e9e2920580f2fda68e25cd32674c9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Ignore license-related configure argumentsJoerg Bornemann2020-10-171-0/+2
| | | | | | | | | | Do not print warnings for the configure arguments -commercial, -opensource and -confirm-license. We're not removing the arguments yet to keep existing build scripts working. Fixes: QTBUG-86096 Change-Id: Ieb63e2f2b81c022e8559cde6c3e0be0b8ce655ca Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Autodetect Android toolchain file and NDKJoerg Bornemann2020-10-131-13/+1
| | | | | | | | | | | | | | | | | | | | The Android toolchain file is now autodetected from the location of the NDK. The NDK location can be specified by setting the CMake variable ANDROID_NDK_ROOT. Auto-detection of the Android toolchain file is the only purpose of this variable. In recent Android SDK installations the path to the NDK is well-known and can be auto-detected too. If only ANDROID_SDK_ROOT is given, we try to detect ANDROID_NDK_ROOT first and from that the Android toolchain file. Adjust the build instructions in cmake/README.md, and remove the part where we suggest to set some environment variables that are only used to create the cmake call. Task-number: QTBUG-87068 Change-Id: Ia0df5df7651e98979e9cead1cdae7b17ecbc4afb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix the -sanitize configure optionJoerg Bornemann2020-10-121-0/+9
| | | | | | | | This needs to map to ECM_ENABLE_SANITIZERS. Fixes: QTBUG-87316 Change-Id: I9e983728af0ba69fd428944e647f0afae8c61772 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement missing iOS-related configure optionsAlexandru Croitor2020-10-121-0/+5
| | | | | | | | | | | | | | | Detect an iOS build when either an -sdk option is passed or when -xplatform macx-ios-clang is passed as a target mkspec. Now that CMake 3.17 is released, change the default behavior of the iOS build to configure with simulator_and_device set to ON, like it is with qmake. Update the documentation regarding iOS configuration. Change-Id: I91aaf706610b8d3c69f1ad4ba9dadee2b1e5db97 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not build tests and examples by default for configure -cmakeKai Koehne2020-10-081-16/+26
| | | | | | | | | | | | | | Tests were never built by default, except for -developer-build. Examples were build, but aren't anymore by default if you run cmake directly. Let the default be figured out by cmake, and only set BUILD_EXAMPLES and BUILD_TESTING if the user has expicitly passed them via -make or -nomake. Task-number: QTBUG-87217 Change-Id: I37321d96cc1e9e184a711a858c860b0205d5b74f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Implement missing Android-related configure optionsJoerg Bornemann2020-10-061-0/+33
| | | | | | | | | | | | | | Implement the last remaining Android-related configure options for the CMake build. Print warnings for options that have no equivalent in the CMake build. Let -android-ndk automatically deduce the CMake toolchain file, and error out if that fails with a hint how to fix the situation. Task-number: QTBUG-85373 Change-Id: I8399e5334ae0f1f6634e381775a308d34f7c482b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Extend message functions in QtProcessConfigureArgs.cmakeJoerg Bornemann2020-10-061-4/+8
| | | | | | | | | | qtConfAddWarning was missing, despite being used. All of the three qtConfAdd* functions take multiple parameters and pass them to the CMake's message() function. Change-Id: I1fad46c6fd00b2e733b32cda482bbf1341ffc63f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix -[no-]warnings-are-errors configure argumentJoerg Bornemann2020-10-011-0/+1
| | | | | | | | The CMake build uses the WARNINGS_ARE_ERRORS variable, and the feature warnings_are_errors exists only in the qmake build. Change-Id: I1e548b30b210b3dd1b2f23041d490a981312f4ba Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake Build: Add support for -qtlibinfix configure parameterCristian Adam2020-09-231-0/+1
| | | | | | | | | Rename all libQt6*.so to libQt6*<infix>.so Task-number: QTBUG-85438 Change-Id: I4b91ffaaec7bea61454b0d3c794c77f2d0868d54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure -redo for top-level buildsJoerg Bornemann2020-09-221-7/+10
| | | | | | | | | | | | | When re-doing in a top-level build, we did not read the config.opt file from the top-level directory. Also, the config.opt file should not contain the -top-level argument. This is an internal option, and on Windows, it was already missing. The information whether we're doing a top-level build is now passed in the CMake variable TOP_LEVEL. Change-Id: Iaecd7306a4b6d9ad494684c201cf12f8e74d684b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: build add flags for building QtAndroid.jarAssam Boudjelthia2020-09-161-0/+2
| | | | | | | | | | | | | Adds -source, -target, -Xlint:unchecked, -bootclasspath flags. Setting default javac build source and target versions to 8. Allow setting custom values for javac build versions via -DQT_ANDROID_JAVAC_SOURCE, and -DQT_ANDROID_JAVAC_TARGET. Task-number: QTBUG-86282 Change-Id: I98f4f193ac96016dc722d178594d7fd401202f68 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix qt-configure-module for modules without qt_cmdline.cmakeJoerg Bornemann2020-09-111-2/+4
| | | | | | | | | | Some repos/modules don't have configure.json files and thus no qt_cmdline.cmake files. Make qt-configure-module check for the file's existence. As drive-by fix, surround the configure.cmake's path by double quotes. Change-Id: If1a91a0bba0c2fd282cfa08fa6ff2bb20f0a15ba Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Implement configure -ltcgJoerg Bornemann2020-09-111-0/+10
| | | | | | | | | | | | | | | | | | | This configure switch sets the CMake variable CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> per release config to ON. The feature 'ltcg' is enabled if any of the variables CMAKE_INTERPROCEDURAL_OPTIMIZATION, CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> are ON. In order to implement the check, configurejson2cmake had to be extended to be able to write extra CMake code before and after the feature definition. This extra code can be added to a feature mapping below the keys "cmakePrelude" and "cmakeEpilogue". Task-number: QTBUG-85373 Change-Id: Ia2eb907edcf087f137977a9b090705397f83eb05 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* 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>