<s>
In	O
software	O
development	O
,	O
CMake	O
is	O
cross-platform	B-Operating_System
free	B-License
and	I-License
open-source	I-License
software	I-License
for	O
build	B-Application
automation	I-Application
,	O
testing	O
,	O
packaging	B-Algorithm
and	O
installation	B-Application
of	O
software	O
by	O
using	O
a	O
compiler-independent	O
method	O
.	O
</s>
<s>
CMake	O
is	O
not	O
a	O
build	B-Application
system	I-Application
itself	O
;	O
it	O
generates	O
another	O
system	O
's	O
build	O
files	O
.	O
</s>
<s>
It	O
is	O
used	O
in	O
conjunction	O
with	O
native	O
build	O
environments	O
such	O
as	O
Make	B-Application
,	O
Qt	B-Language
Creator	I-Language
,	O
Ninja	B-Application
,	O
Android	B-Application
Studio	I-Application
,	O
Apple	O
's	O
Xcode	B-Operating_System
,	O
and	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
.	O
</s>
<s>
It	O
has	O
minimal	O
dependencies	O
,	O
requiring	O
only	O
a	O
C++	B-Language
compiler	B-Language
on	O
its	O
own	O
build	B-Application
system	I-Application
.	O
</s>
<s>
CMake	O
is	O
distributed	O
as	O
open-source	B-Application
software	I-Application
under	O
a	O
permissive	O
BSD-3-Clause	B-Operating_System
license	O
.	O
</s>
<s>
CMake	O
development	O
began	O
in	O
1999	O
.	O
in	O
response	O
to	O
the	O
need	O
for	O
a	O
cross-platform	B-Operating_System
build	O
environment	O
for	O
the	O
Insight	B-Language
Segmentation	I-Language
and	I-Language
Registration	I-Language
Toolkit	I-Language
.	O
</s>
<s>
It	O
was	O
partially	O
inspired	O
by	O
pcmaker	O
,	O
which	O
was	O
made	O
by	O
Ken	O
Martin	O
and	O
other	O
developers	O
to	O
support	O
the	O
Visualization	O
Toolkit	O
(	O
VTK	B-Language
)	O
.	O
</s>
<s>
At	O
Kitware	O
,	O
Bill	O
Hoffman	O
blended	O
components	O
of	O
pcmaker	O
with	O
his	O
own	O
ideas	O
,	O
striving	O
to	O
mimic	O
the	O
functionality	O
of	O
Unix	B-Application
configure	B-Device
scripts	I-Device
.	O
</s>
<s>
Continued	O
development	O
and	O
improvements	O
were	O
fueled	O
by	O
the	O
incorporation	O
of	O
CMake	O
into	O
developers’	O
own	O
systems	O
,	O
including	O
the	O
VXL	B-Application
Project	O
,	O
the	O
CABLE	O
features	O
added	O
by	O
Brad	O
King	O
,	O
and	O
GE	O
Corporate	O
R&D	O
for	O
support	O
of	O
DART	O
.	O
</s>
<s>
Additional	O
features	O
were	O
created	O
when	O
VTK	B-Language
transitioned	O
to	O
CMake	O
for	O
its	O
build	O
environment	O
and	O
for	O
supporting	O
ParaView	B-Language
.	O
</s>
<s>
A	O
key	O
feature	O
is	O
the	O
ability	O
to	O
place	O
compiler	B-Language
outputs	O
(	O
such	O
as	O
object	B-Application
files	I-Application
)	O
outside	O
of	O
the	O
source	O
tree	O
.	O
</s>
<s>
This	O
enables	O
multiple	O
builds	O
from	O
the	O
same	O
source	O
tree	O
and	O
cross-compilation	B-Application
.	O
</s>
<s>
Placing	O
the	O
compiler	B-Language
outputs	O
outside	O
of	O
the	O
source	O
tree	O
keeps	O
the	O
tree	O
separate	O
from	O
the	O
build	O
files	O
,	O
ensuring	O
that	O
removing	O
a	O
build	O
directory	O
will	O
not	O
remove	O
the	O
source	O
files	O
.	O
</s>
<s>
These	O
locations	O
are	O
stored	O
in	O
a	O
cache	B-General_Concept
,	O
which	O
can	O
then	O
be	O
tailored	O
before	O
generating	O
the	O
target	O
build	O
files	O
.	O
</s>
<s>
The	O
cache	B-General_Concept
can	O
be	O
edited	O
with	O
a	O
graphical	O
editor	O
,	O
which	O
is	O
shipped	O
with	O
CMake	O
.	O
</s>
<s>
In	O
addition	O
,	O
CMake	O
can	O
work	O
with	O
projects	O
that	O
require	O
executables	O
to	O
be	O
created	O
before	O
generating	O
code	O
to	O
be	O
compiled	B-Language
for	O
the	O
final	O
application	O
.	O
</s>
<s>
Its	O
open-source	B-Application
,	O
extensible	O
design	O
allows	O
CMake	O
to	O
be	O
adapted	O
as	O
necessary	O
for	O
specific	O
projects	O
.	O
</s>
<s>
CMake	O
can	O
generate	O
project	O
files	O
for	O
several	O
popular	O
IDEs	O
,	O
such	O
as	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
,	O
Xcode	B-Operating_System
,	O
and	O
Eclipse	B-Application
CDT	I-Application
.	O
</s>
<s>
It	O
can	O
also	O
produce	O
build	O
scripts	O
for	O
MSBuild	O
or	O
NMake	O
on	O
Windows	O
;	O
Unix	B-Application
Make	I-Application
on	O
Unix-like	O
platforms	O
such	O
as	O
Linux	B-Application
,	O
macOS	B-Application
,	O
and	O
Cygwin	B-Language
;	O
and	O
Ninja	B-Application
on	O
both	O
Windows	O
and	O
Unix-like	O
platforms	O
.	O
</s>
<s>
CMake	O
allows	O
specification	O
of	O
features	O
that	O
the	O
compiler	B-Language
is	O
required	O
to	O
support	O
in	O
order	O
to	O
get	O
the	O
target	O
program	O
or	O
library	O
compiled	B-Language
.	O
</s>
<s>
CMake	O
supports	O
an	O
extensive	O
list	O
of	O
compilers	B-Language
,	O
including	O
:	O
Apple	O
Clang	B-Application
,	O
Clang	B-Application
,	O
GNU	B-Application
GCC	I-Application
,	O
MSVC	B-Application
,	O
Oracle	B-Application
Developer	I-Application
Studio	I-Application
,	O
and	O
Intel	B-Language
C++	I-Language
Compiler	I-Language
.	O
</s>
<s>
Even	O
though	O
CMake	O
is	O
not	O
a	O
package	B-Application
manager	I-Application
,	O
it	O
provides	O
basic	O
modules	O
(	O
see	O
CPack	B-Application
)	O
functions	O
for	O
installing	O
binaries	O
and	O
package	O
information	O
declared	O
by	O
the	O
script	O
to	O
be	O
used	O
by	O
consumer	O
CMake	O
projects	O
.	O
</s>
<s>
The	O
package	O
may	O
also	O
be	O
packed	O
into	O
an	O
archive	B-Application
file	I-Application
for	O
package	B-Application
manager	I-Application
or	O
installer	O
supported	O
by	O
a	O
target	O
platform	O
.	O
</s>
<s>
Cmake	O
is	O
shipped	O
with	O
built-in	O
ncurses	B-Language
program	O
that	O
can	O
be	O
used	O
to	O
configure	B-Device
projects	O
via	O
command-line	O
interface	O
.	O
</s>
<s>
Then	O
the	O
platform	O
's	O
native	O
build	B-Application
tools	I-Application
(	O
native	O
toolchain	O
)	O
are	O
used	O
for	O
actual	O
building	O
of	O
programs	O
.	O
</s>
<s>
Unix	B-Application
Makefiles	O
for	O
make	B-Application
)	O
and	O
associated	O
toolchain	O
files	O
.	O
</s>
<s>
Advanced	O
users	O
can	O
also	O
create	O
and	O
incorporate	O
additional	O
makefile	O
generators	O
to	O
support	O
their	O
specific	O
compiler	B-Language
and	O
OS	O
needs	O
.	O
</s>
<s>
Previously	O
it	O
was	O
done	O
via	O
-prefixed	O
global	O
variables	O
that	O
are	O
also	O
used	O
to	O
configure	B-Device
CMake	O
itself	O
and	O
to	O
set	O
up	O
initial	O
defaults	O
.	O
</s>
<s>
)	O
,	O
object	B-Application
file	I-Application
libraries	O
or	O
pseudo-targets	O
(	O
including	O
aliases	O
)	O
.	O
</s>
<s>
CMake	O
can	O
produce	O
object	B-Application
files	I-Application
that	O
can	O
be	O
linked	O
against	O
by	O
executable	O
binaries/libraries	O
,	O
avoiding	O
dynamic	O
(	O
run-time	O
)	O
linking	O
and	O
using	O
static	O
(	O
compile-time	O
)	O
linking	O
instead	O
.	O
</s>
<s>
It	O
's	O
possible	O
to	O
generate	O
precompiled	B-Language
headers	I-Language
by	O
using	O
CMake	O
since	O
version	O
3.6	O
.	O
</s>
<s>
CMake	O
has	O
a	O
relatively	O
simple	O
interpreted	B-Application
,	O
imperative	O
scripting	O
language	O
.	O
</s>
<s>
CMake	O
supports	O
extracting	O
values	O
into	O
variables	O
from	O
JSON-data	O
strings	O
(	O
since	O
version	O
3.19	O
)	O
.	O
</s>
<s>
The	O
executable	O
programs	O
CMake	O
,	O
CPack	B-Application
,	O
and	O
CTest	O
are	O
written	O
in	O
the	O
C++	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
Since	O
release	O
3.0	O
,	O
CMake	O
's	O
documentation	O
uses	O
reStructuredText	B-Language
markup	O
.	O
</s>
<s>
HTML	O
pages	O
and	O
man	O
pages	O
are	O
generated	O
by	O
the	O
Sphinx	B-Language
documentation	O
generator	O
.	O
</s>
<s>
modules	O
)	O
,	O
testing	O
the	O
toolchain	O
environment	O
and	O
executables	O
,	O
packaging	B-Algorithm
releases	O
(	O
module	O
and	O
command	O
)	O
,	O
and	O
managing	O
dependencies	O
on	O
external	O
projects	O
(	O
module	O
)	O
:	O
</s>
<s>
CPack	B-Application
is	O
a	O
packaging	B-Algorithm
system	O
for	O
software	O
distributions	O
.	O
</s>
<s>
Linux	B-Application
RPM	B-Application
,	O
deb	O
,	O
and	O
gzip	B-Application
packages	O
(	O
for	O
both	O
binaries	O
and	O
source	O
code	O
)	O
.	O
</s>
<s>
NSIS	B-Language
files	O
(	O
for	O
Microsoft	B-Application
Windows	I-Application
)	O
.	O
</s>
<s>
macOS	B-Application
packages	O
.	O
</s>
<s>
Android	B-Application
NDK	I-Application
,	O
Netflix	O
,	O
Inria	O
,	O
MySQL	B-Application
,	O
Boost	B-Language
(	O
C++	B-Language
libraries	O
)	O
,	O
KeePassXC	B-Language
,	O
KDE	B-Application
,	O
KiCAD	B-Language
,	O
FreeCAD	B-Language
,	O
Webkit	B-Language
,	O
Blender	B-Application
,	O
Biicode	O
,	O
ReactOS	B-Application
,	O
Apache	O
QPid	O
,	O
the	O
ATLAS	O
experiment	O
,	O
and	O
Second	B-Application
Life	I-Application
.	O
</s>
<s>
The	O
following	O
source	O
code	O
files	O
demonstrate	O
how	O
to	O
build	O
a	O
simple	O
hello	O
world	O
program	O
written	O
in	O
C++	B-Language
by	O
using	O
CMake	O
.	O
</s>
<s>
Shell	B-Operating_System
commands	O
to	O
run	O
CMake	O
on	O
a	O
Linux	B-Application
system	O
(	O
to	O
be	O
entered	O
in	O
the	O
directory	O
that	O
contains	O
the	O
two	O
files	O
above	O
)	O
:	O
</s>
