Difference between revisions of "Cmake"

From IGEP - ISEE Wiki

Jump to: navigation, search
(Create your cmake hello world)
Line 22: Line 22:
 
Enter inside the directory and create your main.c file with the hello world code:  
 
Enter inside the directory and create your main.c file with the hello world code:  
  
<source lang="c">  
+
<source lang="java">  
 
 
 
include &lt;stdio.h&gt;<br><br>int main (int argn, char *argv[])<br>{<br>&nbsp;&nbsp; &nbsp;printf("hello world\n");<br>&nbsp;&nbsp; &nbsp;return 0;<br>}<br>&lt;/source&gt;<br>
 
include &lt;stdio.h&gt;<br><br>int main (int argn, char *argv[])<br>{<br>&nbsp;&nbsp; &nbsp;printf("hello world\n");<br>&nbsp;&nbsp; &nbsp;return 0;<br>}<br>&lt;/source&gt;<br>
 
</source>
 
</source>

Revision as of 11:31, 9 February 2014

Start Developing with CMAKE

The cross-platform, open-source make system. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation.


Useful information

CMAKE wiki page

Install cmake

Using Ubuntu 12.04 is very simple install it using apt-get as:

sudo apt-get install cmake cmake-gui

Create your cmake hello world

First we will create a new directory:

mkdir cmake_hello_world

Enter inside the directory and create your main.c file with the hello world code:

 
include &lt;stdio.h&gt;<br><br>int main (int argn, char *argv[])<br>{<br>&nbsp;&nbsp; &nbsp;printf("hello world\n");<br>&nbsp;&nbsp; &nbsp;return 0;<br>}<br>&lt;/source&gt;<br>