Details
-
Suggestion
-
Resolution: Done
-
P4: Low
-
None
Description
CMake tool chain files may provide information about the
- compiler (CMAKE_C_COMPILER/CMAKE_CXX_COMPILER)
- Qt version (QT_QMAKE_EXECUTABLE)
- sysroot (CMAKE_FIND_ROOT_PATH)
and much more. There is no information about a debugger, but maybe this and some other options can be derived or guessed. The actual use case is MXE.cc which builds mingw-w64 cross-compilers and libraries on Linux and creates a CMake toolchain file. The target specific binaries are prefixed with x86_64-w64-mingw32.shared- etc.
Case 1: Configuring Qt Creator options
The above information could be used either to configure the corresponding dedicated "Build & Run" options of Qt Creator, or to configure a special "CMake toolchain file" type of kit.
The location of the CMake toolchain file could be added to the properties of the kit for later reference.
Case 2: Selecting the tool chain file in project configuration
In addition to selecting kits (which may provide insufficient information especially for configuring cross-compilation builds), there might be an option to select a CMake toolchain file (from the file system, or from the "Build & Run" options).
Case 3: Provide a Qt Creator generated CMake toolchain file
This is not about using but about creating CMake toolchain files. For configuring CMake, adding the compiler's directory to the PATH is not sufficient because CMake can't know the name of the executable. Qt Creator should actually provide a CMake toolchain file for each kit. There are some forum posts on this issue, and QTCREATORBUG-12916 is about this issue, too.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-12916 CMake invocation ignores QtCreator selected compiler
- Closed