-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 18.0.0
-
None
Steps to reproduce.
1) Ensure homebrew cmake is the one in PATH in the terminal
2) Configure analogclock example on the command line with a prebuilt Qt using qt-cmake
e.g.
cd ~/my_analog_build_dir ~/Dev/qt/official/6.9.2/macos/bin/qt-cmake ~/Dev/qt/official/Examples/Qt-6.9.2/widgets/widgets/analogclock
3) Confirm the cmake version used by checking the CMakeCache.txt in the build dir
CMAKE_COMMAND:INTERNAL=/opt/homebrew/bin/cmake
4) Install a standalone cmake from https://github.com/Kitware/CMake/releases/tag/v4.1.1 , by unpacking it somewhere, and adding it to Creator in Settings -> CMake -> Tools -> Add, and making sure to "Make Default" it.
5) Open $HOME/Dev/qt/official/Examples/Qt-6.9.2/widgets/widgets/analogclock/CMakeLists.txt as a project, paste the build dir "HOME/my_analog_build_dir" into "Import Build From", press Import and then Configure Project.
6) Observe that it's running the default Creator cmake version on the the build dir, rather than trying to extract the previous cmake version from CMAKE_COMMAND in CMakeCache.txt
In my case I see
Running /Users/alex/.local/share/mise/installs/cmake/4.1.0/CMake.app/Contents/bin/cmake -S /Users/alex/Dev/qt/official/Examples/Qt-6.9.2/widgets/widgets/analogclock -B /Users/alex/Dev/qt/builds/dev-mac-super/analog in /Users/alex/Dev/qt/builds/dev-mac-super/analog.
This can lead to full rebuilds of the project, due to different CMake versions placing command line options in a different order on the command line, among other possible issues.
It would be good for Creator to detect the cmake version from CMakeCache.txt, and use it instead.
- relates to
-
QTCREATORBUG-33490 When importing a prebuilt CMake project into Creator, if there is no .cmake dir in the build dir, Creator will auto-run CMake without asking, even if the global Autorun CMake option is OFF
-
- Reported
-