[Qt-creator] Problem with CMake

Eike Ziller Eike.Ziller at qt.io
Tue Nov 17 11:39:56 CET 2020



> On Nov 17, 2020, at 10:59, Björn Schäpers <qt-maillist at hazardy.de> wrote:
> 
> Okay I think I have an answer:
> 
> First Time choosing the Profile "Release with Debuginformation" for the Kit
> > Führe C:\msys64\mingw64\bin\cmake.exe -S C:/GIT/llvm-dev/llvm -B C:/Users/bjs/AppData/Local/Temp/QtCreator-dyrKAq/qtc-cmake-AHjacTSx "-GCodeBlocks - MinGW Makefiles" "-DCMAKE_BUILD_TYPE:String=RelWithDebInfo" "-DQT_QMAKE_EXECUTABLE:STRING=C:/GIT/corporate.git/Qt5-x64-release/qtbase/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=C:/GIT/corporate.git/Qt5-x64-release/qtbase" "-DCMAKE_C_COMPILER:STRING=C:/msys64/mingw64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/msys64/mingw64/bin/g++.exe" in C:\Users\bjs\AppData\Local\Temp\QtCreator-dyrKAq\qtc-cmake-AHjacTSx aus.
> 
> Setting LLVM_TARGETS_TO_BUILD from "all" to "X86" and LLVM_ENABLE_PROJECTS from "" to "clang"
> Pressing Apply
> > Führe C:\msys64\mingw64\bin\cmake.exe -S C:/GIT/llvm-dev/llvm -B C:/Users/bjs/AppData/Local/Temp/QtCreator-dyrKAq/qtc-cmake-AHjacTSx "-DLLVM_ENABLE_PROJECTS:STRING=clang" "-DLLVM_TARGETS_TO_BUILD:STRING=X86" in C:\Users\bjs\AppData\Local\Temp\QtCreator-dyrKAq\qtc-cmake-AHjacTSx aus.
> 
> Hitting Apply again
> > Führe C:\msys64\mingw64\bin\cmake.exe -S C:/GIT/llvm-dev/llvm -B C:/Users/bjs/AppData/Local/Temp/QtCreator-dyrKAq/qtc-cmake-AHjacTSx in C:\Users\bjs\AppData\Local\Temp\QtCreator-dyrKAq\qtc-cmake-AHjacTSx aus.
> 
> Apply is now disabled, Setting the Build Target to "Current Executable" (which is FormatTests)
> Hitting CTRL+R
> > Führe C:\msys64\mingw64\bin\cmake.exe -S C:/GIT/llvm-dev/llvm -B C:/GIT/llvm-dev/build-llvm-Desktop_64_Bit_Release-Release-mit-Debuginformationen "-GCodeBlocks - MinGW Makefiles" "-DCMAKE_BUILD_TYPE:String=RelWithDebInfo" "-DQT_QMAKE_EXECUTABLE:STRING=C:/GIT/corporate.git/Qt5-x64-release/qtbase/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=C:/GIT/corporate.git/Qt5-x64-release/qtbase" "-DCMAKE_C_COMPILER:STRING=C:/msys64/mingw64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/msys64/mingw64/bin/g++.exe" in C:\GIT\llvm-dev\build-llvm-Desktop_64_Bit_Release-Release-mit-Debuginformationen aus.
> 
> So it seems it chooses a different path.
> 
> I aborted the build (CMakes run does finish either way), when I now configure the project the CMake call is in the right path.
> > Führe C:\msys64\mingw64\bin\cmake.exe -S C:/GIT/llvm-dev/llvm -B C:/GIT/llvm-dev/build-llvm-Desktop_64_Bit_Release-Release-mit-Debuginformationen "-DLLVM_ENABLE_PROJECTS:STRING=clang" "-DLLVM_TARGETS_TO_BUILD:STRING=X86" in C:\GIT\llvm-dev\build-llvm-Desktop_64_Bit_Release-Release-mit-Debuginformationen aus.
> 
> So the question is how to use the correct path in the beginning?

See Cristians mail for the option to skip the temporary directory.

Nevertheless this is a bug - Qt Creator should either pass all necessary and changed options to the CMake call in the actual build path, or switch already to the actual build path when users manually fiddle with the CMake configuration.

Br, Eike



-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list