How to create Project using CMake in Qt creator
-
Hi ,
I am trying to create project by selecting Cmake from drop down but it is not configured i have added Cmake through manage kits how can i configure this.
Getting fallowing error
Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/sample "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-sample-Desktop_Qt_5_14_0_MinGW_64_bit-Release.
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!Also tried to install Ninja https://github.com/ninja-build/ninja/releases that also did not help me.
Please someone guide me how can i solve this.
-
Hi ,
I am trying to create project by selecting Cmake from drop down but it is not configured i have added Cmake through manage kits how can i configure this.
Getting fallowing error
Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/sample "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-sample-Desktop_Qt_5_14_0_MinGW_64_bit-Release.
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!Also tried to install Ninja https://github.com/ninja-build/ninja/releases that also did not help me.
Please someone guide me how can i solve this.
-
@sush123 That's not what I mean.
You should try to set CMAKE_MAKE_PROGRAM, so it points to make executable from MinGW.
In QtCreator you can do it in Projects/YOUR_KIT/Build/CMake and then add this variable (or edit when already there) and set whole path to make from MinGW. -
Hi ,
I am trying to create project by selecting Cmake from drop down but it is not configured i have added Cmake through manage kits how can i configure this.
Getting fallowing error
Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/sample "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-sample-Desktop_Qt_5_14_0_MinGW_64_bit-Release.
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!Also tried to install Ninja https://github.com/ninja-build/ninja/releases that also did not help me.
Please someone guide me how can i solve this.
@sush123 Did you follow the step described in documentation?
-
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'.
-
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 -
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?
-
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.
-
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.
-
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. -
@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.
-
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