This is an extremely simple example C++ application which uses CMake to build a hello that links in different manners to LAPACK.
As this is an example of how to use CMake you'll need to download it (http://www.cmake.org/cmake/resources/software.html) or install it via:
sudo apt-get install cmake
Once CMake has been install navigate to the root of the project and issue the following commands:
mkdir build
cd build
cmake .. && make