How to compile cmake on linux server?

I want to compile cmake in my working folder on one of the super computing facility. I am not sure how to compile it in my working directory. Can anyone please help me in this regard?


Have you tried as described in the documentation?

Yes I tried that, but don’t know where I am going wrong. I am not familiar much with coding.

Could you please provide all steps you do?
What step has failed?
Could you please provide an error message?

1] ./bootstrap > this step is working properly.
2] After this step it is asking me to run gmake. and then it is showing following error…


Could you please provide the version of Linux/gcc do you using?

one of the options can be to disable testing (since an error in it)

./bootstrap -- -DBUILD_TESTING=OFF

Now it is showing following error

Looks like your compiler does not supports C++11 standard, even experimental.
Could you please provide compiler information/version?

Following is the compiler information (I hope I am providing the required information)


I’m not sure when CMake make C++11 standard mandatory, but it’s clear to me that you’ll not be able to compile it with gcc 4.1.
You need a more recent compiler (at least 4.6 IMO).

Seems it since 3.10 (

Thank you Sergei for your efforts and valuable time.

Thanks Jakub Zakrzewski. But I am not much familiar with coding, so i didn’t understand much from the given link. Could you please guide me in simple way?

Nothing really - it’s just a link to a commit that introduced hard C++11 dependency. It was in CMake 3.10, so since this version a compiler supporting C++11 is required for building CMake.

The only 2 things you can do is either to set on CMake 3.9 or upgrade your compiler.

Okay… Thanks! Will try that one

Now I tried with CMake 3.9.6
Executed following command:
./bootstrap – -DCMAKE_BUILD_TYPE:STRING=Release
It worked properly. Then it asked me to run gmake.
After this when I checked CMake version by cmake --version it is showing me older version.

Do I need to execute some more commands? Please suggest.


It’s not enough to compile something. You have to install it somewhere and make sure that somewhere is in your path.
It’s usually not a good idea to install self-compiled software over the version provided by your package manager. I usually install stuff to ~/local and have ~/local/bin in my PATH.