summaryrefslogtreecommitdiffstats
path: root/cmake/configure-cmake-mapping.md
Commit message (Collapse)AuthorAgeFilesLines
* 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: Map configure -hostdatadir to INSTALL_MKSPECSDIRJoerg Bornemann2020-11-101-0/+1
| | | | | | | | | | 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: Ignore license-related configure argumentsJoerg Bornemann2020-10-171-3/+3
| | | | | | | | | | 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: Fix the -sanitize configure optionJoerg Bornemann2020-10-121-1/+1
| | | | | | | | 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-2/+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>
* CMake: Implement missing Android-related configure optionsJoerg Bornemann2020-10-061-6/+6
| | | | | | | | | | | | | | 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: Implement configure -reduce-exportsJoerg Bornemann2020-10-051-1/+1
| | | | | | | | | | | | | | | | | This option maps to FEATURE_reduce_exports. The feature is on by default, except for MSVC. The reduce_exports configure test is not used in the CMake build. The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties are now explicitly initialized in the qt_set_common_target_properties function, because we don't have access to the feature in QtSetup.cmake where the CMAKE_<LANG>_VISIBILITY_PRESET variables were set before. Task-number: QTBUG-85373 Change-Id: I378453f0e0665731970016170302871e20ceb4e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix -[no-]warnings-are-errors configure argumentJoerg Bornemann2020-10-011-2/+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-1/+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: 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: Implement configure -ltcgJoerg Bornemann2020-09-111-1/+2
| | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | Change-Id: I38a938cda91a525d2af22deec864c6a12af3e29d Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Remove the -no-compile-examples configure switchJoerg Bornemann2020-09-111-1/+0
| | | | | | | | | | | | If '-make examples -no-compile-examples' was specified, sources of Qt's examples would be installed, but the examples would not be built. This switch has always been a source for confusion and is only interesting for distributors, who can just package the examples directory tree. Change-Id: I0291d70e4951d98b553a4abf217db49d05316d3a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Document more configure argument mappingsJoerg Bornemann2020-09-101-57/+66
| | | | | Change-Id: I4f96fd59566d011088e426342db9cc6536d63a71 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -traceJoerg Bornemann2020-09-011-1/+2
| | | | | | Task-number: QTBUG-85373 Change-Id: Ib9ac35ec98dd5b6c272f58f8a61a124d1d262ec0 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Implement configure -force-assertsJoerg Bornemann2020-08-271-1/+1
| | | | | Change-Id: Ife15b8d008c5b3f5eed61ec3bc048fda4c4b4e46 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -gdb-indexJoerg Bornemann2020-08-231-1/+1
| | | | | Change-Id: Iea0fb99297751b1baf830a416ea5041d0b9a3b63 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -optimize-sizeJoerg Bornemann2020-08-231-1/+1
| | | | | | | | | | | | This configure switch controls the feature 'optimize_size'. This isn't merely a mapping to CMAKE_BUILD_TYPE=MinSizeRel, because we potentially want to combine -optimize-size with -force-debug-info, which maps to CMAKE_BUILD_CONFIG=RelWithDebInfo. Task-number: QTBUG-85373 Change-Id: I1a9343ebc54816f52e90e9d33ea3df4c99b1ec9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Document more configure argument mappingsJoerg Bornemann2020-08-231-3/+3
| | | | | Change-Id: Icda71c14cde638e874cc2e6406527b9c98535165 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -linker [bfd,gold,lld]Joerg Bornemann2020-08-201-1/+2
| | | | | | Fixes: QTBUG-86155 Change-Id: I5ba2d3b52d9ca240b48904c492f7902a056c0292 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -qreal <type>Joerg Bornemann2020-08-191-1/+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-4/+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: Extend configure-cmake-mapping.mdJoerg Bornemann2020-08-131-44/+36
| | | | | Change-Id: Ie54b131c9a7b0f560fa735562fc4cbae4df35a49 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Document the mapping of configure options to CMake argumentsJoerg Bornemann2020-07-021-0/+161
Add internal documentation how to map configure options to CMake arguments. This patch adds a markdown file with a giant table, and cmake/README.md links to it. Change-Id: I94a6a4ee24ed0114ccb3095d2c13cf5d84e2de72 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>