I am using trying to install a newer version (2.8.11) of Cmake on my linux machine. The version already installed is 2.8.6. Now I build the newer version with cmake command in a separate mycmakebuild folder. then i run make command. according to the cmake website, if i run cmake from my build folder*mycmakebuild* , make install command is optional. Which means after running cmake and make commands, i do not need to run make install. But when I check the version of cmake in mycmakebuild folder using cmake --version, it still shows the older version. (I do not have admin privilege to run make install command). please suggest what could be wrong.
What if I want to run cmake command outside of mycmakebuild folder? It still runs the older version. How to give it the path to run cmake from the updated version.

- 101
- 2
- 9
1 Answers
It sounds very much like you just call the newly built executable the wrong way. After you change directory to where the executalbe is, you call it with
./cmake
instead of only
cmake
The first calls the executable inside the current directory, the latter the one found in the systems search path ($PATH).
If you like to call your cmake-Version from anotherplace, just prepend the path to it, something like
mycmakebuild/src/cmake
As for the make install: you can do it, you just have to adjust the path to where the files should go. If you run make edit_cache inside your build-directory, you can set the CMAKE_INSTALL_PREFIX to e.g. /home/yourlogin/cmake and cmake will install to that location. Using this, you can also get rid of the many (useless) object files inside the build directory.

- 91
- 6
-
Thank you for your help. I have installed using bootstrap and now i Can see the updated version running. – Mahwish Jun 09 '13 at 13:59