CMake... ccmake or cmake?
CmakeCmake Problem Overview
What is the difference between cmake
and ccmake
? I have the Ubuntu package cmake
installed, and on my Windows computer, I have the installer from the website, but neither have the command ccmake
available. Yet, the tutorials, seem to reference it quite regularly.
It seems that ccmake
on Unix is CMakeSetup
on Windows (which is the setup program). But I'm a little confused about it; is it just an alternative to manually typing your own CMakeLists.txt
files?
Cmake Solutions
Solution 1 - Cmake
I think ccmake
is the GUI for manipulating files generated by / used by the cmake
system.
Solution 2 - Cmake
ccmake
is the curses (terminal handling library) interface to CMake.
cmake
is the CLI (Command Line Interface)
Solution 3 - Cmake
sudo apt-get install cmake-curses-gui
Solution 4 - Cmake
ccmake :
It is teminal based GUI to edit the default options or paths in CMakeLists.txt
.
Usage:
After you have generated configure files using cmake ..
in build
folder. Then do ccmake ..
, to see all the options and paths which can be be modified by pressing Enter
for editing. After editing press c
again to configure. This will save the files in build folder with your edited settings. Then do make -j4
, for building the MakeFile
.
Solution 5 - Cmake
ccmake (for Unix) and CMakeSetup (for NT) are indeed equivalent: a UI to cmake. They basically call cmake and display how your project is configured, what libraries have been found and where (for libraries referenced with FIND_LIBRARY. It gives you a chance to review and modify these variables before generating the Makefile or project.