diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-09-26 15:47:54 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-11-25 11:58:50 +0000 |
commit | d48fa5b8d6c797fb2637ada5fbb0009fd9847355 (patch) | |
tree | 5c0c1df0fc4696b6f64a25ba2f1e5f64de1ca4dd | |
parent | 3228d2626f8be736f992a4712e503368c245faa0 (diff) | |
download | qt-creator-d48fa5b8d6c797fb2637ada5fbb0009fd9847355.tar.gz |
Doc: Update info about building with CMake
Change-Id: I30813c51deec50043c0015aef5a672babe6b5608
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | doc/images/qtcreator-cmake-build-settings.png | bin | 41710 -> 11650 bytes | |||
-rw-r--r-- | doc/images/qtcreator-cmake-build-steps.png | bin | 7998 -> 5838 bytes | |||
-rw-r--r-- | doc/images/qtcreator-cmake-clean-steps.png | bin | 8315 -> 6320 bytes | |||
-rw-r--r-- | doc/images/qtcreator-cmakeexecutable.png | bin | 11541 -> 13050 bytes | |||
-rw-r--r-- | doc/images/qtcreator-kits.png | bin | 28799 -> 27172 bytes | |||
-rw-r--r-- | doc/src/cmake/creator-projects-cmake-building.qdocinc | 6 | ||||
-rw-r--r-- | doc/src/cmake/creator-projects-cmake.qdoc | 11 | ||||
-rw-r--r-- | doc/src/editors/creator-locator.qdoc | 5 | ||||
-rw-r--r-- | doc/src/projects/creator-only/creator-projects-building.qdoc | 31 |
9 files changed, 42 insertions, 11 deletions
diff --git a/doc/images/qtcreator-cmake-build-settings.png b/doc/images/qtcreator-cmake-build-settings.png Binary files differindex 35b4401820..534ddf6be1 100644 --- a/doc/images/qtcreator-cmake-build-settings.png +++ b/doc/images/qtcreator-cmake-build-settings.png diff --git a/doc/images/qtcreator-cmake-build-steps.png b/doc/images/qtcreator-cmake-build-steps.png Binary files differindex 1679217c51..5809136a85 100644 --- a/doc/images/qtcreator-cmake-build-steps.png +++ b/doc/images/qtcreator-cmake-build-steps.png diff --git a/doc/images/qtcreator-cmake-clean-steps.png b/doc/images/qtcreator-cmake-clean-steps.png Binary files differindex 9ecfbc74f1..88be99d715 100644 --- a/doc/images/qtcreator-cmake-clean-steps.png +++ b/doc/images/qtcreator-cmake-clean-steps.png diff --git a/doc/images/qtcreator-cmakeexecutable.png b/doc/images/qtcreator-cmakeexecutable.png Binary files differindex a0475e0c04..b98085b4e0 100644 --- a/doc/images/qtcreator-cmakeexecutable.png +++ b/doc/images/qtcreator-cmakeexecutable.png diff --git a/doc/images/qtcreator-kits.png b/doc/images/qtcreator-kits.png Binary files differindex 05e8cc0df3..4dfaa560f3 100644 --- a/doc/images/qtcreator-kits.png +++ b/doc/images/qtcreator-kits.png diff --git a/doc/src/cmake/creator-projects-cmake-building.qdocinc b/doc/src/cmake/creator-projects-cmake-building.qdocinc index bca11658e4..a31449984c 100644 --- a/doc/src/cmake/creator-projects-cmake-building.qdocinc +++ b/doc/src/cmake/creator-projects-cmake-building.qdocinc @@ -57,6 +57,10 @@ To reset the changes that you made, select \uicontrol Reset. + To reconfigure CMake, select \uicontrol Build > + \uicontrol {Clear CMake Configuration}, and then + select \uicontrol Build > \uicontrol {Rescan Project}. + //! [cmake build configuration] @@ -65,7 +69,7 @@ \section2 CMake Build Steps \QC builds CMake projects by running \c {cmake . --build}, which then runs - run whatever is needed based on how the project was configured: \c make, + whatever is needed based on how the project was configured: \c make, \c mingw32-make, \c nmake, or \c ninja, for example. You can add arguments and targets for the build command in diff --git a/doc/src/cmake/creator-projects-cmake.qdoc b/doc/src/cmake/creator-projects-cmake.qdoc index 585031ded7..a6d0ad6671 100644 --- a/doc/src/cmake/creator-projects-cmake.qdoc +++ b/doc/src/cmake/creator-projects-cmake.qdoc @@ -61,6 +61,10 @@ provide less information to the code model, which will then fail to resolve includes and defines. + For CMake version 3.14, or later, \QC supports the + \l {https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html} + {file-based API}. + To specify paths to CMake executables: \list 1 @@ -99,9 +103,14 @@ \section1 Editing CMake Configuration Files To open a CMakeLists.txt file for editing, right-click it in the - \uicontrol Projects view and select \uicontrol {Open with} > + \uicontrol Projects view and select \uicontrol {Open With} > \uicontrol {CMake Editor}. + You can also use the \c cmo filter in the \l {Searching with the Locator} + {locator} to open the CMakeLists.txt file for the current run configuration + in the editor. This is the same build target as when you select + \uicontrol Build > \uicontrol {Build for Run Configuration}. + The following features are supported: \list diff --git a/doc/src/editors/creator-locator.qdoc b/doc/src/editors/creator-locator.qdoc index e7c048f6d2..cd99ab139b 100644 --- a/doc/src/editors/creator-locator.qdoc +++ b/doc/src/editors/creator-locator.qdoc @@ -150,6 +150,11 @@ \if defined(qtcreator) \li Running external tools (\c x) + \li Using CMake to build the project for the current run configuration + (\c {cm}). For more information, see \l {Setting up CMake}. + \li Opening the CMakeLists.txt file for the current run configuration in + the editor (\c {cmo}). This is the same build target as when you + select \uicontrol Build > \uicontrol {Build for Run Configuration}. \endif \endlist diff --git a/doc/src/projects/creator-only/creator-projects-building.qdoc b/doc/src/projects/creator-only/creator-projects-building.qdoc index c87557dc69..86b8b61748 100644 --- a/doc/src/projects/creator-only/creator-projects-building.qdoc +++ b/doc/src/projects/creator-only/creator-projects-building.qdoc @@ -84,16 +84,18 @@ To quickly check the compile output for changes that you made in one file or subproject, you can use the \uicontrol Build menu commands to build a file or - subproject. + subproject. The available build menu commands depend on the build system + you selected for the project: CMake, qmake, or Qbs. - To build the executable that corresponds to the selected run configuration, - select \uicontrol Build > \uicontrol {Build for Run Configuration}. + Select \uicontrol Build > \uicontrol {Build for Run Configuration} to + build the executable that corresponds to the selected run configuration. + You can also use the \c cm filter in the \l {Searching with the Locator} + {locator}. To remove all build artifacts, select \uicontrol Build > \uicontrol {Clean All} or \uicontrol {Clean Project}. To clean the build directory and then build the project, select \uicontrol Build > \uicontrol {Rebuild All} or - \uicontrol {Rebuild Project}. If you use qmake, rebuilding also runs qmake - to generate new Makefiles between cleaning and building. + \uicontrol {Rebuild Project}. To build and clean projects without dependencies, select the \uicontrol {Build Without Dependencies}, @@ -101,11 +103,22 @@ \uicontrol {Clean Without Dependencies} options in the context menu in the \uicontrol Projects view. - \section1 Additional qmake Commands + To run qmake or CMake to regenerate build system files, select + \uicontrol Build > \uicontrol {Run qmake} or \uicontrol {Run CMake}. - To run qmake to generate new Makefiles, select \uicontrol Build > - \uicontrol qmake. To prevent failures on incremental builds, it might make - sense to always run qmake before building, even though it means that + \section2 Building with CMake + + \QC automatically runs CMake when you make changes to \c {CMakeLists.txt} + files. To disable this feature, select \uicontrol Tools > + \uicontrol Options > \uicontrol Kits > \uicontrol CMake > + \uicontrol {Autorun CMake}. + + For more information, see \l {Setting Up CMake}. + + \section2 Building with qmake + + To prevent failures on incremental builds, it might make sense + to always run qmake before building, even though it means that building will take more time. To enable this option, select \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} > \uicontrol qmake > \uicontrol {Run qmake on every build}. |