GLM is a header only library. Hence, there is nothing to build to use it. To use GLM, merely include <glm/glm.hpp> header. This include provides all the GLSL features implemented by GLM.
GLM is a header-only library, and thus does not need to be compiled. We can use GLM's implementation of GLSL's mathematics functionality by including the `<glm/glm.hpp>` header. The library can also be installed with CMake, though the details of doing so will differ depending on the target build system.
Core GLM features can be included using individual headers to allow faster user program compilations.
Features can also be included individually to shorten compilation times.
```cpp
#include<glm/vec2.hpp> // vec2, bvec2, dvec2, ivec2 and uvec2
@ -165,24 +166,25 @@ Core GLM features can be included using individual headers to allow faster user
#include<glm/trigonometric.hpp> // all the GLSL trigonometric functions
#include<glm/vector_relational.hpp> // all the GLSL vector relational functions
### <aname="section1_2"></a> 1.2. Faster program compilation
GLM is a header only library that makes a heavy usage of C++ templates.
This design may significantly increase the compile time for files that use GLM. Hence, it is important to limit GLM inclusion to header and source files that actually use it. Likewise, GLM extensions should be
included only in program sources using them.
GLM uses C++ templates heavily, and may significantly increase compilation times for projects that use it. Hence, source files should only include the headers they actually use.
To further help compilation time, GLM 0.9.5 introduced <glm/fwd.hpp> that provides forward declarations of GLM types.
To reduce compilation time, we can include `<glm/fwd.hpp>`, which forward-declares all types should their definitions not be needed.
```cpp
// Header file (forward declarations only)
#include<glm/fwd.hpp>
// Source file (actual implementation)
#include<glm/glm.hpp>;
// At this point, we don't care what exactly makes up a vec2; that won't matter
When <glm/glm.hpp> is included, GLM provides all the GLSL features it implements in C++.
There is no dependence with external libraries or external headers such as gl.h, [*glcorearb.h*](http://www.opengl.org/registry/api/GL/glcorearb.h), gl3.h, glu.h or windows.h. However, if <boost/static\_assert.hpp>
is included, [*Boost static assert*](http://www.boost.org/doc/libs/1_52_0/doc/html/boost_staticassert.html) will be used all over GLM code to provide compiled time errors unless
GLM is built with a C++ 11 compiler in which case [static\_assert](http://en.cppreference.com/w/cpp/language/static_assert).
If neither are detected, GLM will rely on its own implementation of static assert.
GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`. However, if we include `<boost/static_assert.hpp>`, then [`Boost.StaticAssert`](http://www.boost.org/doc/libs/release/libs/static_assert) will be used to provide compile-time errors. Otherwise, if using a C++11 compiler, the standard `static_assert` will be used instead. If neither is available, GLM will use its own implementation of `static_assert`.