How to create Project using CMake in Qt creator
-
wrote on 17 Jan 2020, 14:11 last edited by
I'm not sure why it doesn't find your version of ninja. Did you restart QtCreator after installing Ninja? Make sure your CMake Generator is set properly. Tools->Kits->(Select your Kit)->CMake generator (towards the bottom). You could try switching your Generator to 'MinGW Makefiles'.
-
wrote on 20 Jan 2020, 06:50 last edited by
Can anyone help me to find Ninja setup to install.
I tried using below link but it is disappearing after double clicking on setup file not sure why,
https://github.com/ninja-build/ninja/releases -
Can anyone help me to find Ninja setup to install.
I tried using below link but it is disappearing after double clicking on setup file not sure why,
https://github.com/ninja-build/ninja/releases@sush123 Do you really need Ninja? Make (which is part of MinGW) can compile several files in parallel.
-
wrote on 20 Jan 2020, 08:55 last edited by
i am not sure really need ninja or not but not able to narrow down a reason for getting error like
" CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!?"After setting CMAKE_MAKE_PROGRAM, this as well
-
i am not sure really need ninja or not but not able to narrow down a reason for getting error like
" CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!?"After setting CMAKE_MAKE_PROGRAM, this as well
@sush123 said in How to create Project using CMake in Qt creator:
After setting CMAKE_MAKE_PROGRAM
How, when and where did you set it?
-
wrote on 20 Jan 2020, 10:17 last edited by
Created new sample project by selecting :
Application -> Qt Widgets Application ->build system (Cmake) in dropdown->Checked Desktop Qt 5.14.0 MinGW 64-bit.I can see project created in Qt creator which is not configured warning symbol before project name.
-
Created new sample project by selecting :
Application -> Qt Widgets Application ->build system (Cmake) in dropdown->Checked Desktop Qt 5.14.0 MinGW 64-bit.I can see project created in Qt creator which is not configured warning symbol before project name.
@sush123 You need to set CMAKE_MAKE_PROGRAM in your projects Build settings: "Projects/Build & Run/YOUR_KIT/Build/CMake"
-
wrote on 21 Jan 2020, 03:44 last edited by
Yes i did that then it changed warning symbol into folder kind but then still i am getting this error :
Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/untitled4 "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/s28194/Documents/build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug/CMakeFiles/CMakeOutput.log".
CMake process exited with exit code 1.Also Build and run icons are disabled.
-
Yes i did that then it changed warning symbol into folder kind but then still i am getting this error :
Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/untitled4 "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/s28194/Documents/build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug/CMakeFiles/CMakeOutput.log".
CMake process exited with exit code 1.Also Build and run icons are disabled.
@sush123 You should not pass -GNinja to CMake
Other possibility would be to install Ninja and add the path to it to PATH in your projects Build settings.
-
wrote on 21 Jan 2020, 06:14 last edited by
i tried adding ninja exe path under manage kits -> Cmake -> under manual i added "pathtofindninja",
Still no changes,
i could see error symbol with "Invalid codemodel file generated by Cmake " message under projects -> Build settings -
i tried adding ninja exe path under manage kits -> Cmake -> under manual i added "pathtofindninja",
Still no changes,
i could see error symbol with "Invalid codemodel file generated by Cmake " message under projects -> Build settings@sush123 said in How to create Project using CMake in Qt creator:
kits -> Cmake
This is for CMake and not Ninja!
Please add the path containing ninja.exe to PATH in your projects Build settings. -
wrote on 21 Jan 2020, 06:23 last edited by
@jsulm said in How to create Project using CMake in Qt creator:
PATH in
im really not finding where excatly i should add this ninja exe path in project settings.
-
@jsulm said in How to create Project using CMake in Qt creator:
PATH in
im really not finding where excatly i should add this ninja exe path in project settings.
@sush123 "Projects/Build & Run/YOUR_KIT/Build/Build Environment" - edit PATH variable here (append directory containing ninja.exe).
-
wrote on 21 Jan 2020, 09:16 last edited by
i did append path C:\Qt\Qt5.14.0\Tools\mingw730_64\bin;C:\Users\s28194\Documents\ninja.exe;C:\Users\s28194\AppData\Local\Microsoft\WindowsApps;
still i have disabled icons for build and run at left bottom.
-
i did append path C:\Qt\Qt5.14.0\Tools\mingw730_64\bin;C:\Users\s28194\Documents\ninja.exe;C:\Users\s28194\AppData\Local\Microsoft\WindowsApps;
still i have disabled icons for build and run at left bottom.
@sush123 said in How to create Project using CMake in Qt creator:
C:\Users\s28194\Documents\ninja.exe
This is wrong. In PATH you only add directories, so:
C:\Qt\Qt5.14.0\Tools\mingw730_64\bin;C:\Users\s28194\Documents
-
wrote on 21 Jan 2020, 10:20 last edited by
thank you so much it configured
-
@sush123 Great I could help! :-)
15/22