I have compiled the library armadillo installed it with sudo make install. Then I linked it with the following options
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-long-long -std=c++14 -fext-numeric-literals -Wno-cast-function-type -ffast-math -larmadillo -lblas -lm -llapack")
I get the following linking error bayesian_estimation.cpp:(.text+0x4ad5): undefined reference to `dgemm_'
I also installed lapack and blas with sudo apt-get install