Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
Qt Creator 12.0.1
-
None
Description
KSergeiP 6 days ago
I configured the kit with Compiler = No, because... my CMAKE project takes TOOLCHAIN_PATH to determine which compiler to use
I can't explicitly specify the compiler due to the project structure
The project is being assembled, there are no errors.
Cmake detects the compiler correctly:
[cmake] – Detecting C compile features
[cmake] – Detecting C compile features - done
.......
But Qt Creator print a warning: ":-1: warning: The project contains C source files, but the currently active kit has no C compiler. The code model will not be fully functional."
And compiler header files are highlighted as undefined.
I added .cmake\api\v1\query\toolchains-v1 as recommended here https://www.qt.io/blog/qt-creator-4.15-cmake-new-features.
PreLoad.cmake:
foreach(file cache-v2 cmakeFiles-v1 codemodel-v2 toolchains-v1)
file(WRITE "${CMAKE_BINARY_DIR}/.cmake/api/v1/query/${file}" "")
endforeach()
Cmake created an answer: \.cmake\api\v1\reply\toolchains-v1-4c26314d5e0855a6356f.json which contains all the information about the compiler
But Qt Creator does not process this file and the compiler warning still appears. Also, of course, Qt Creator cannot correctly determine the compiler header files.