I am trying to build something that requires CMake, however when I try:
cmake -DBUILD_EXAMPLES=YES -DBUILD_TESTS=YES
I get the error:
Your systems default compiler is GCC. This project makes use of c++11
features present only in versions of gcc >= 4.9. You can use a different
compiler by re-running cmake with the command switch "-D
CMAKE_CXX_COMPILER=<compiler>"
I have tried using CMAKE_CXX_COMPILER=c++11
and CMAKE_CXX_COMPILER=g++11
but those get errors too. Is this because I am using the wrong variable or because I don't have c++11 installed? What would be the fix for it?